Python docker image build fails due to gcc error - python-3.x

I am studying Nornir and want to containerize my application, here is the Dockerfile content:
FROM alpine
RUN apk update && apk upgrade
RUN apk add gcc && apk add py3-pip && apk add libevent-dev
RUN apk add python3-dev && pip3 install nornir
When I build the container with the command:
docker build --network=host .
I get the following errors:
somaiia#main-srv:~/core/nornir$ docker build --no-cache --network=host .
Sending build context to Docker daemon 10.24kB
Step 1/4 : FROM alpine
...
Step 4/4 : RUN apk add python3-dev && pip3 install nornir
---> Running in 025aee6693e4
(1/1) Installing python3-dev (3.9.7-r4)
Executing busybox-1.34.1-r5.trigger
OK: 229 MiB in 66 packages
Collecting nornir
Downloading nornir-3.3.0-py3-none-any.whl (30 kB)
Collecting typing_extensions<5.0,>=4.1
Downloading typing_extensions-4.2.0-py3-none-any.whl (24 kB)
Collecting importlib-metadata<5,>=4
Downloading importlib_metadata-4.11.4-py3-none-any.whl (18 kB)
Collecting ruamel.yaml>=0.17
Downloading ruamel.yaml-0.17.21-py3-none-any.whl (109 kB)
Collecting mypy_extensions<0.5.0,>=0.4.1
Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting zipp>=0.5
Downloading zipp-3.8.0-py3-none-any.whl (5.4 kB)
Collecting ruamel.yaml.clib>=0.2.6
Downloading ruamel.yaml.clib-0.2.6.tar.gz (180 kB)
**ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vs5bwupe/ruamel-yaml-clib_e6dc2477a7f349c6866be26f31b40c2e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vs5bwupe/ruamel-yaml-clib_e6dc2477a7f349c6866be26f31b40c2e/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-jh_alwhp
cwd: /tmp/pip-install-vs5bwupe/ruamel-yaml-clib_e6dc2477a7f349c6866be26f31b40c2e/
Complete output (7 lines):
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lssp_nonshared
collect2: error: ld returned 1 exit status
sys.argv ['/tmp/pip-install-vs5bwupe/ruamel-yaml-clib_e6dc2477a7f349c6866be26f31b40c2e/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-jh_alwhp']
test compiling /tmp/tmp_ruamel_zq9s1x2j/test_ruamel_yaml.c -> test_ruamel_yaml link error /tmp/tmp_ruamel_zq9s1x2j/test_ruamel_yaml.c
Exception: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/8b/25/08e5ad2431a028d0723ca5540b3af6a32f58f25e83c6dda4d0fcef7288a3/ruamel.yaml.clib-0.2.6.tar.gz#sha256=4ff604ce439abb20794f05613c374759ce10e3595d1867764dd1ae675b85acbd (from https://pypi.org/simple/ruamel-yaml-clib/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting ruamel.yaml>=0.17
Downloading ruamel.yaml-0.17.20-py3-none-any.whl (109 kB)
Downloading ruamel.yaml-0.17.19-py3-none-any.whl (109 kB)
Downloading ruamel.yaml-0.17.18-py3-none-any.whl (109 kB)
Downloading ruamel.yaml-0.17.17-py3-none-any.whl (109 kB)
Collecting ruamel.yaml.clib>=0.1.2
Downloading ruamel.yaml.clib-0.2.2.tar.gz (179 kB)
Using legacy 'setup.py install' for ruamel.yaml.clib, since package 'wheel' is not installed.
Installing collected packages: zipp, ruamel.yaml.clib, typing-extensions, ruamel.yaml, mypy-extensions, importlib-metadata, nornir
Running setup.py install for ruamel.yaml.clib: started
Running setup.py install for ruamel.yaml.clib: finished with status 'done'
Successfully installed importlib-metadata-4.11.4 mypy-extensions-0.4.3 nornir-3.3.0 ruamel.yaml-0.17.17 ruamel.yaml.clib-0.2.2 typing-extensions-4.2.0 zipp-3.8.0**
I am unable to build Nornir and can't proceed with the next steps as a result, what can I do?

In the logs the error originates from this
Collecting ruamel.yaml.clib>=0.2.6
Downloading ruamel.yaml.clib-0.2.6.tar.gz (180 kB)
**ERROR: Command errored out with exit status 1:
But following the logs we this
Collecting ruamel.yaml.clib>=0.1.2
Downloading ruamel.yaml.clib-0.2.2.tar.gz (179 kB)
Basically the first dependeny requirement demanded the ruamel.yaml.clib version to be greater or equal to 0.2.6, but it failed.
In the next try it tried for a version greater or equal to 0.1.2.
In the final logs we see
Successfully installed ... nornir-3.3.0 ruamel.yaml.clib-0.2.2 ...**
Meaning it successfully installed an older version of ruamel.yaml.clib library and finally installed the nornir library as well

Related

Error 'openssl/crypto.h' file not found when installing PycURL on Mac using pip

When installing Python3 packages on macOS X 10.15 Catalina using pip install -r requirements.txt I am getting this error:
× Running setup.py install for pycurl did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-8r44qz4e/pycurl_09ab3d56141443439eb3f41fa62f7b0f/setup.py:771: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(distutils.__version__) > LooseVersion("1.0.1"):
/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-8r44qz4e/pycurl_09ab3d56141443439eb3f41fa62f7b0f/setup.py:773: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(distutils.__version__) < LooseVersion("1.0.3"):
Using curl-config (libcurl 7.84.0)
running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-cpython-39
creating build/lib.macosx-10.15-x86_64-cpython-39/curl
copying python/curl/__init__.py -> build/lib.macosx-10.15-x86_64-cpython-39/curl
running build_ext
building 'pycurl' extension
creating build/temp.macosx-10.15-x86_64-cpython-39
creating build/temp.macosx-10.15-x86_64-cpython-39/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -DPYCURL_VERSION=\"7.43.0\" -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/local/Cellar/curl/7.84.0/include -I/usr/local/opt/python#3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/docstrings.c -o build/temp.macosx-10.15-x86_64-cpython-39/src/docstrings.o
In file included from src/docstrings.c:4:
src/pycurl.h:170:13: fatal error: 'openssl/crypto.h' file not found
# include <openssl/crypto.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
So It fails on installing PycURL because it cannot find the openssl include directory.
I have first added cryptography==37.0.4 to the requirements.txt file but then I got:
src/pycurl.h:178:13: fatal error: 'openssl/ssl.h' file not found
Then I have tried installing latest openssl with:
brew update
brew install openssl
brew link --force openssl
ln -s /usr/local/opt/openssl/lib/libcrypto.3.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.3.dylib /usr/local/lib/
ln -s /usr/local/Cellar/openssl/3.0.4/bin/openssl /usr/local/bin/openssl
But it didn't help.
I also tried:
export PYCURL_SSL_LIBRARY=openssl
export LDFLAGS="-L/usr/local/opt/openssl#3/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#3/include"
pip install --no-cache-dir --compile --ignore-installed --install-option="--with-openssl" pycurl
But also with no success.
Any help on this?
What eventually helped was:
Remove pycurl from the requirements.txt file
Install openssl with: brew install openssl
Find openssl installation directory with
$ brew --prefix openssl
/usr/local/opt/openssl#3
$ ls -la /usr/local/opt/openssl#3
lrwxr-xr-x 1 runner admin 25 Jul 6 09:13 /usr/local/opt/openssl#3 -> ../Cellar/openssl#3/3.0.4
Install PycURL specifying inline the above openssl install directories like this:
PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/usr/local/Cellar/openssl#3/3.0.4/lib" CPPFLAGS="-I/usr/local/Cellar/openssl#3/3.0.4/include" pip3 install --no-cache-dir pycurl
Now the PycURL installs without any problem:
Collecting pycurl
Downloading pycurl-7.45.1.tar.gz (233 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 233.9/233.9 kB 64.5 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: pycurl
Building wheel for pycurl (setup.py): started
Building wheel for pycurl (setup.py): finished with status 'done'
Created wheel for pycurl: filename=pycurl-7.45.1-cp39-cp39-macosx_10_15_x86_64.whl size=146607 sha256=aff9581cbd6ddec739c529df376ad2d4edf49dafdad179a9b68bddeb60a739b3
Stored in directory: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-ephem-wheel-cache-hjqadgim/wheels/4d/ef/77/ffab9dc4b0016ce4f780b752e0020815e416f0d27a701a816f
Successfully built pycurl
Installing collected packages: pycurl
Successfully installed pycurl-7.45.1

Unable to install geopandas on python3.9 on macOS Big Sur

I am trying to install geopandas on the machine described above.
This is what I am doing the error I get:
sudo pip3 install geopandas
Collecting geopandas
Downloading geopandas-0.8.1-py2.py3-none-any.whl (962 kB)
|████████████████████████████████| 962 kB 5.0 MB/s
Collecting fiona
Downloading Fiona-1.8.18.tar.gz (1.3 MB)
|████████████████████████████████| 1.3 MB 4.8 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python#3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-fbu0u179/fiona/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-fbu0u179/fiona/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/tmp/pip-pip-egg-info-knmlby9t
cwd: /private/tmp/pip-install-fbu0u179/fiona/
Complete output (2 lines):
Failed to get options via gdal-config: [Errno 2] No such file or directory: 'gdal-config'
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
GDAL is a required library for Geopandas and it needs to be built and compiled on your system and in your path before you pip install geopandas
If you are using homebrew, you can install it with
brew install gdal
and verify the installation by running
gdal-config --version
One note is that Gdal has a lot of dependencies and will take a bit to install. Using homebrew, it worked for me in one shot but it will likely upgrade a number of prerequisites including GCC and perhaps even python itself.
I should note that this worked for me on Catalina. If you are an M1 Mac with Big Sur every tool in this chain may not be upgradeable to native M1 code at this time and you may need some of the workarounds at How to run the Homebrew installer under Rosetta 2 on M1 Macbook

Can't install spacy python3.7

So, while installing spacy, I have got this error
ERROR: Command errored out with exit status 1: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' 'c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-n0y5abli\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1 Check the logs for full command output.
command: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' 'c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-4cphnz1x\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1
cwd: None
Complete output (65 lines):
Collecting setuptools
Using cached setuptools-50.3.0-py3-none-any.whl (785 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting cython>=0.25
Using cached Cython-0.29.21-cp37-cp37m-win32.whl (1.5 MB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.3.tar.gz (51 kB)
Collecting preshed<3.1.0,>=3.0.2
Using cached preshed-3.0.2.tar.gz (167 kB)
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.2.tar.gz (35 kB)
Collecting thinc==7.4.1
Using cached thinc-7.4.1.tar.gz (1.3 MB)
Collecting blis<0.5.0,>=0.4.0
Using cached blis-0.4.1.tar.gz (1.8 MB)
Collecting wasabi<1.1.0,>=0.0.9
Using cached wasabi-0.8.0-py3-none-any.whl (23 kB)
Collecting srsly<1.1.0,>=0.0.6
Using cached srsly-1.0.2.tar.gz (192 kB)
Collecting catalogue<1.1.0,>=0.0.7
Using cached catalogue-1.0.0-py2.py3-none-any.whl (7.7 kB)
Collecting numpy>=1.7.0
Using cached numpy-1.19.2-cp37-cp37m-win32.whl (10.9 MB)
Collecting plac<1.2.0,>=0.9.6
Using cached plac-1.1.3-py2.py3-none-any.whl (20 kB)
Collecting tqdm<5.0.0,>=4.10.0
Using cached tqdm-4.50.2-py2.py3-none-any.whl (70 kB)
Collecting importlib-metadata>=0.20; python_version < "3.8"
Using cached importlib_metadata-2.0.0-py2.py3-none-any.whl (31 kB)
Collecting zipp>=0.5
Using cached zipp-3.3.0-py3-none-any.whl (5.3 kB)
Using legacy 'setup.py install' for cymem, since package 'wheel' is not installed.
Using legacy 'setup.py install' for preshed, since package 'wheel' is not installed.
Using legacy 'setup.py install' for murmurhash, since package 'wheel' is not installed.
Using legacy 'setup.py install' for thinc, since package 'wheel' is not installed.
Using legacy 'setup.py install' for blis, since package 'wheel' is not installed.
Using legacy 'setup.py install' for srsly, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, cython, cymem, murmurhash, preshed, numpy, blis, wasabi, srsly, zipp, importlib-metadata, catalogue, plac, tqdm, thinc
Running setup.py install for cymem: started
Running setup.py install for cymem: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-ur6uxv4r\\cymem\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-ur6uxv4r\\cymem\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\User\AppData\Local\Temp\pip-record-lp67dha5\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-4cphnz1x\overlay' --compile --install-headers 'C:\Users\User\AppData\Local\Temp\pip-build-env-4cphnz1x\overlay\Include\cymem'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-ur6uxv4r\cymem\
Complete output (18 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\cymem
copying cymem\about.py -> build\lib.win32-3.7\cymem
copying cymem\__init__.py -> build\lib.win32-3.7\cymem
package init file 'cymem\tests\__init__.py' not found (or not a regular file)
creating build\lib.win32-3.7\cymem\tests
copying cymem\tests\test_import.py -> build\lib.win32-3.7\cymem\tests
copying cymem\cymem.pyx -> build\lib.win32-3.7\cymem
copying cymem\cymem.pxd -> build\lib.win32-3.7\cymem
copying cymem\__init__.pxd -> build\lib.win32-3.7\cymem
running build_ext
building 'cymem.cymem' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
I am using the last Python 3.7.
Working on Windows 10.
Python is 64 bit.
I don't know what to do.
Also, I tried to reinstall Python, run cmd as admin, but it gives me the same error.
I also tried to search for the same problem but didn't find anything.
Help.
This result when installing (trying to install packages from source instead of binary wheels in windows) means that you're running 32-bit python and not 64-bit python.
Double-check that the python in your virtual environment is really 64-bit python. You can inspect sys.maxsize to check -- it should be 9223372036854775807. Use python -m pip instead of just pip to be sure you're installing for the right venv for the python version that you just checked.

Installing mod-wsgi in centos7 via pip3 throws "ERROR: Command errored out with exit status 1"

Below is the error occurred on installing mod-wsgi using pip tool.
[root#localhost ~]# pip3 install mod-wsgi
Collecting mod-wsgi Downloading https://files.pythonhosted.org/packages/a0/8b/34dd82c3e15a031e9c89f5a5d2ca527ec35b7a01e1e7530abb61ffdb4d60/mod_wsgi-4.7.0.tar.gz (497kB)
|████████████████████████████████| 501kB 111kB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-72ufrkfx/mod-wsgi/setup.py'"'"';
__file__='"'"'/tmp/pip-install-72ufrkfx/mod-wsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-72ufrkfx/mod-wsgi/pip-egg-info
cwd: /tmp/pip-install-72ufrkfx/mod-wsgi/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-72ufrkfx/mod-wsgi/setup.py", line 168, in <module>
'missing Apache httpd server packages.' % APXS)
RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.
---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
There is a system requirement details given in the official mod-wsgi install page - https://pypi.org/project/mod-wsgi/
Since my system is centos7, I install below packages for fixing the issue.
yum install httpd httpd-devel -y
[root#localhost ~]# pip3 install mod-wsgi
Collecting mod-wsgi
Using cached https://files.pythonhosted.org/packages/a0/8b/34dd82c3e15a031e9c89f5a5d2ca527ec35b7a01e1e7530abb61ffdb4d60/mod_wsgi-4.7.0.tar.gz
Installing collected packages: mod-wsgi
Running setup.py install for mod-wsgi ... done
Successfully installed mod-wsgi-4.7.0

Unable to build scrapy based project due to invalid environment marker error

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
The issue was related to pip3 upgrade. One of the contributors to the package shared the tip here

Resources