I am unable to build docker image with Ubuntu as base OS for one of my projects written few months ago using Scrapy. Its showing following dependency error -
Downloading/unpacking cryptography>=2.1.4 (from pyOpenSSL->Scrapy==1.4.0->-r /app/requirements.txt (line 3))
Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography
error in cryptography setup command: Invalid environment marker: platform_python_implementation != 'PyPy'
Complete output from command python setup.py egg_info:
error in cryptography setup command: Invalid environment marker: platform_python_implementation != 'PyPy'
As I have no control over Scrapy's dependencies and I have been using Scrapy 1.4.0, latest release, alongwith Python 3, I am not sure what are my options now?
Following is the command I use to install the dependencies
pip3 install -r requirements.txt
Following is what my requirements.txt looks like
lxml==3.8.0
psycopg2==2.7.3.1
Scrapy==1.4.0
Twisted==17.5.0
validators==0.12.0
tweepy==3.5.0
Update:
The build goes fine on a Mac machine as shown below while it doesn't work on a Ubuntu machine. Note: Even a successful build does warn about platform_python_implementation != "PyPy"
as shown below -
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=2.1.4->pyOpenSSL->Scrapy==1.4.0->-r requirements.txt (line 3))
Downloading cffi-1.11.2-cp35-cp35m-macosx_10_6_intel.whl (240kB)
100% |████████████████████████████████| 245kB 623kB/s
Collecting asn1crypto>=0.21.0 (from cryptography>=2.1.4->pyOpenSSL->Scrapy==1.4.0->-r requirements.txt (line 3))
Downloading asn1crypto-0.23.0-py2.py3-none-any.whl (99kB)
100% |████████████████████████████████| 102kB 830kB/s
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.1.4->pyOpenSSL->Scrapy==1.4.0->-r requirements.txt (line 3))
Building wheels for collected packages: zope.interface, oauthlib
Running setup.py bdist_wheel for zope.interface ... done
Stored in directory: /Users/rahul/Library/Caches/pip/wheels/8b/39/98/0fcb72adfb12b2547273b1164d952f093f267e0324d58b6955
Running setup.py bdist_wheel for oauthlib ... done
Stored in directory: /Users/rahul/Library/Caches/pip/wheels/e5/46/f7/bb2fde81726295a13a71e3c6396d362ab408921c6562d6efc0
Successfully built zope.interface oauthlib