Install the scrapy package of python3.4 in centos7
Ste0: switch to the python version
[Root @ localhost lxml] # mv/usr/bin/python2.7.5/usr/bin/python # Switch the python version
Step 1: Install dependency Package 1
[Root @ localhost opt] # yum-y install libxslt-devel # Note: it can only be run under python2.7 by default.
Step 2: Install dependency Package 1
[Root @ localhost opt] # yum-y install libffi-devel # Note: it can only be run under python2.7 by default.
Step 3: switch to the python version
[Root @ localhost opt] # mv/usr/bin/python2.7.5/usr/bin/python
[Root @ localhost bin] # mv/usr/bin/python/usr/bin/python2.7.5
[Root @ localhost bin] # ln-s/usr/local/bin/python3.4/usr/bin/python
The default python version is python3.4.
Step 4: Install scrapy
[Root @ localhost opt] # pip3.4 install scrapy
Note: The setuptools and pip packages must be successfully installed. During python3.4 installation, setuptools and pip will be installed by default.
Step 5: view results
[Root @ localhost opt] # pip3.4 freeze
Attrs = 15.2.0
Cffi = 1.5.2
Cryptography = 1.3.1
Cssselect = 0.9.1
Extends ER = 0.10.0
Idna = 2.1
Lxml = 3.6.0
Matplotlib = 1.5.1
Numpy = 1.11.0
Pyasn1 = 0.1.9
Pyasn1-modules = 0.0.8
Pycparser = 2.14
PyOpenSSL = 16.0.0
Pyparsing = 2.1.1
Python-dateutil = 2.5.2
Pytz = 2016.3
Queuelib = 1.4.2
Scipy = 0.20.
Scrapy = 1.0.5
Service-identity = 16.0.0
Six = 1.10.0
Twisted = 16.0.0
W3lib = 1.20.
Zope. interface = 4.1.3
For similar versions such as python2.7.5, see: https://www.douban.com/group/topic/51645204/
The main steps are as follows:
1. yum-y install libxslt-devel
2. yum-y install libffi-devel
3. pip install scrapy