Ubuntu16.04 When installing Scrapy (pip install scrapy), the following error is indicated:
Failed Building Wheel forCryptography Running setup.py Clean forcryptographyfailed to build Cryptographyerror:command'X86_64-LINUX-GNU-GCC'Failed with exit status1----------------------------------------Command"/usr/bin/python-u-C"Import Setuptools, tokenize;__file__='/tmp/pip-build-2wwgqs/cryptography/setup.py'; F=getattr (Tokenize,'Open', open) (__file__); Code=f.read (). Replace ('\ r \ n','\ n'); F.close (); Exec (compile (code, __FILE__,'exec'))"Install--record/tmp/pip-ippc2q-record/install-record.txt--single-version-externally-managed--compile"Failed with error code1 inch/tmp/pip-build-2wwgqs/cryptography/
Workaround, refer to: http://stackoverflow.com/questions/22073516/failed-to-install-python-cryptography-package-with-pip-and-setup-py
On Windows
If you're on the Windows you'll need to make sure you have OpenSSL installed. There is pre-compiled binaries available. If your installation is in a unusual location set the LIB and INCLUDE environment variables to INCLUDE the corresponding Locations. For example:
C:\> \path\to\vcvarsall.Bat x86_amd64c:\> Set LIB=c:\openssl- 1.0. 1f-64bit\lib;%lib< Span class= "pun" >%c:\> set Include=< Span class= "PLN" >c:\openssl-1.0 1f-64bit\include;%< Span class= "PLN" >include%c:\> pip Install cryptography
Building Cryptography on Linux
Cryptography should build very easily on Linux provided are a C compiler, headers for Python (if you ' re not using PYP y), and headers for the OpenSSL and Libffi libraries available on your system.
For Debian and Ubuntu, the following command would ensure that the required dependencies is installed:
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
For Fedora and Rhel-derivatives, the following command would ensure that the required dependencies is installed:
sudo yum install gcc libffi-devel python-devel openssl-devel
You should now is able to build and install cryptography with the usual.
pip install cryptography
Command ' X86_64-LINUX-GNU-GCC ' failed with exit status 1 errors and Solutions