Python 安装模块报错 No package 'libffi' found
直接 yum install libffi-devel
然后 pip install scrapy
[[email protected] opt]# pip install scrapy
Collecting scrapy
Downloading Scrapy-1.3.3-py2.py3-none-any.whl (240kB)
100% |████████████████████████████████| 245kB 1.4MB/s
Collecting queuelib (from scrapy)
Downloading queuelib-1.4.2-py2.py3-none-any.whl
Collecting cssselect>=0.9 (from scrapy)
Downloading cssselect-1.0.1-py2.py3-none-any.whl
Collecting lxml (from scrapy)
Downloading lxml-3.7.3-cp27-cp27m-manylinux1_x86_64.whl (6.8MB)
100% |████████████████████████████████| 6.8MB 151kB/s
Collecting parsel>=1.1 (from scrapy)
Downloading parsel-1.1.0-py2.py3-none-any.whl
Collecting service-identity (from scrapy)
Downloading service_identity-16.0.0-py2.py3-none-any.whl
Collecting w3lib>=1.15.0 (from scrapy)
Downloading w3lib-1.17.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5.2 in /usr/include/python2.7/lib/python2.7/site-packages (from scrapy)
Collecting Twisted>=13.1.0 (from scrapy)
Downloading Twisted-17.1.0.tar.bz2 (3.0MB)
100% |████████████████████████████████| 3.0MB 362kB/s
Collecting PyDispatcher>=2.0.5 (from scrapy)
Downloading PyDispatcher-2.0.5.tar.gz
Collecting pyOpenSSL (from scrapy)
Downloading pyOpenSSL-17.0.0-py2.py3-none-any.whl (51kB)
100% |████████████████████████████████| 61kB 2.2MB/s
Collecting pyasn1 (from service-identity->scrapy)
Downloading pyasn1-0.2.3-py2.py3-none-any.whl (53kB)
100% |████████████████████████████████| 61kB 1.7MB/s
Collecting attrs (from service-identity->scrapy)
Downloading attrs-16.3.0-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity->scrapy)
Downloading pyasn1_modules-0.0.8-py2.py3-none-any.whl
Collecting zope.interface>=3.6.0 (from Twisted>=13.1.0->scrapy)
Downloading zope.interface-4.4.0-cp27-cp27m-manylinux1_x86_64.whl (171kB)
100% |████████████████████████████████| 174kB 2.9MB/s
Collecting constantly>=15.1 (from Twisted>=13.1.0->scrapy)
Downloading constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from Twisted>=13.1.0->scrapy)
Downloading incremental-16.10.1-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from Twisted>=13.1.0->scrapy)
Downloading Automat-0.5.0-py2.py3-none-any.whl
Collecting cryptography>=1.7 (from pyOpenSSL->scrapy)
Downloading cryptography-1.8.1.tar.gz (423kB)
100% |████████████████████████████████| 430kB 1.9MB/s
Requirement already satisfied: setuptools in /usr/include/python2.7/lib/python2.7/site-packages (from zope.interface>=3.6.0->Twisted>=13.1.0->scrapy)
Collecting idna>=2.1 (from cryptography>=1.7->pyOpenSSL->scrapy)
Downloading idna-2.5-py2.py3-none-any.whl (55kB)
100% |████████████████████████████████| 61kB 1.9MB/s
Collecting asn1crypto>=0.21.0 (from cryptography>=1.7->pyOpenSSL->scrapy)
Downloading asn1crypto-0.22.0-py2.py3-none-any.whl (97kB)
100% |████████████████████████████████| 102kB 2.6MB/s
Requirement already satisfied: packaging in /usr/include/python2.7/lib/python2.7/site-packages (from cryptography>=1.7->pyOpenSSL->scrapy)
Collecting enum34 (from cryptography>=1.7->pyOpenSSL->scrapy)
Downloading enum34-1.1.6-py2-none-any.whl
Collecting ipaddress (from cryptography>=1.7->pyOpenSSL->scrapy)
Downloading ipaddress-1.0.18-py2-none-any.whl
Collecting cffi>=1.4.1 (from cryptography>=1.7->pyOpenSSL->scrapy)
Downloading cffi-1.10.0-cp27-cp27m-manylinux1_x86_64.whl (394kB)
100% |████████████████████████████████| 399kB 1.3MB/s
Requirement already satisfied: appdirs>=1.4.0 in /usr/include/python2.7/lib/python2.7/site-packages (from setuptools->zope.interface>=3.6.0->Twisted>=13.1.0->scrapy)
Requirement already satisfied: pyparsing in /usr/include/python2.7/lib/python2.7/site-packages (from packaging->cryptography>=1.7->pyOpenSSL->scrapy)
Collecting pycparser (from cffi>=1.4.1->cryptography>=1.7->pyOpenSSL->scrapy)
Downloading pycparser-2.17.tar.gz (231kB)
100% |████████████████████████████████| 235kB 714kB/s
Building wheels for collected packages: Twisted, PyDispatcher, cryptography, pycparser
Running setup.py bdist_wheel for Twisted ... done
Stored in directory: /root/.cache/pip/wheels/65/e3/44/cd3da92c03926aabc80e658e11d6e64619abce3ef44c1c34df
Running setup.py bdist_wheel for PyDispatcher ... done
Stored in directory: /root/.cache/pip/wheels/86/02/a1/5857c77600a28813aaf0f66d4e4568f50c9f133277a4122411
Running setup.py bdist_wheel for cryptography ... done
Stored in directory: /root/.cache/pip/wheels/c2/12/b8/54077d2a681ad55e244675c3bad78ed27e01916b96f63a32cc
Running setup.py bdist_wheel for pycparser ... done
Stored in directory: /root/.cache/pip/wheels/a8/0b/41/dc95621f9d3a0da7bc191b8a71f0e8182ffd3cc5f33ac55005
Successfully built Twisted PyDispatcher cryptography pycparser
Installing collected packages: queuelib, cssselect, lxml, w3lib, parsel, idna, asn1crypto, enum34, ipaddress, pycparser, cffi, cryptography, pyOpenSSL, pyasn1, attrs, pyasn1-modules, service-identity, zope.interface, constantly, incremental, Automat, Twisted,
PyDispatcher, scrapy
Successfully installed Automat-0.5.0 PyDispatcher-2.0.5 Twisted-17.1.0 asn1crypto-0.22.0 attrs-16.3.0 cffi-1.10.0 constantly-15.1.0 cryptography-1.8.1 cssselect-1.0.1 enum34-1.1.6 idna-2.5 incremental-16.10.1 ipaddress-1.0.18 lxml-3.7.3 parsel-1.1.0 pyOpenSSL-17.0.0
pyasn1-0.2.3 pyasn1-modules-0.0.8 pycparser-2.17 queuelib-1.4.2 scrapy-1.3.3 service-identity-16.0.0 w3lib-1.17.0 zope.interface-4.4.0
无报错,很顺利就装上了