Install Scrapy framework (python) under windows

1. Download and install Python 2.7.6, because Scrapy does not support version 3.x yet. Latest Python 2 Release - Python 2.7.6, select the current user when installing.

2. Go to http://sourceforge.NET/projects/pywin32/files/pywin32/Build%20219/ to download and install pywin32-219.win-amd64-py2.7.exe

3. Copy C:\python27\Scripts;C: \python27; is added to the environment variable.

4. http://slproweb.com/products/Win32OpenSSL.html Go here to download Visual C++ 2008 Redistributables and Win32 OpenSSL v1.0.1g Light and install it. Select the current user when installing. Add the bin directory of OpenSSL to the environment variable (C:\OpenSSL-Win32)

5. Go to https://pypi.python.org/pypi/setuptools#windows-7-or-graphical-install to download ez_setup.py, use Python Run ez_setup.py (double-click), the tool will be installed automatically.

6. Go to https://pypi.python.org/pypi/zope.interface/4.1.1#downloads to download zope.interface-4.1.1-py2 .7-win32.egg installation, copy to Python/Scripts, run easy_install zope.interface-4.1.1-py2.7-win32.egg. (If the suffix name is not egg, modify it to egg)

7. Go to https://pypi.python.org/pypi/pyOpenSSL/0.13 to download pyOpenSSL-0.13-py2.7-win32.egg and install the same as 6.

8. Go to https://pypi.python.org/pypi/lxml/3.3.5 to download lxml-3.3.5.win32-py3.2.exe and install

9. Go to https://pypi.python.org/pypi/ Twisted/14.0.0 Download Twisted-14.0.0.win32-py2.7.exe to install. (Select the current user during installation)

10. Go to https://pypi.python.org/pypi/cryptography/0.4#downloads to download cryptography-0.4-cp27-none-win32.whl and install the same as 6

11, https://pypi. python.org/pypi/cffi/0.8.2Download cffi-0.8.2-cp27-none-win32.whl and install the same as six

12, go to https://pypi.python.org/pypi/service_identity/0.2#downloads to download service_identity -0.2-py2.py3-none-any.whl Installation is the same as 6

13. Running easy_install scrapy under the command line will automatically download and complete the installation.


Note: The above installation takes win32 as an example. If it is win64, all 64-bit installation packages must be downloaded. When installing WIn64OpenSSL on win64, put libeay32.dll and ssleay32.dll in the C:\OpenSSL-Win32\bin directory under C:\windows\system32, otherwise there will be an error when running scrapy.



Summary

of problems: 1. If steps 10-12 are not installed, there will be a pyOpenSSL warning and an error of service_identity not being installed. Both of them should install the compiler first, and both VC2008 and VC2010 can be used. If it is not VC2008, you need to create an environment variable: VS90COMNTOOLS, the variable value is the same as VS100COMNTOOLS.



2. If "Unable to find vcvarsall.bat" appears, it means that VC2008 is not installed.


Original address: http://blog.csdn.net/niying/article/details/27103081

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326276099&siteId=291194637