No reprint:
Self-study python, then build a crawler frame scrapy. It cost me a whole morning's work. Finally build success, in case you forget to build the process, hereby write this post, write
***************************************************************************************************************
First install Python, I installed the python2.7.12, installed in the F:\python2.7.12, the resources to download themselves. Because the Python management tool is automatically installed when Python is installed, do not control PIP installation. You just have to install it one step at a time.
The next step is to run Python in cmd, so configure the environment variable:
Add the following in the path path:
"; F:\python2.7.12; F:\python2.7.12\Scripts\"
This is my path: C:\ProgramData\Oracle\Java\javapath;
%SystemRoot%\System32;
%SystemRoot%;
%systemroot%\system32\wbem;
%systemroot%\system32\windowspowershell\v1.0\;
%java_home%\bin;
%catalina_home%\lib;
E:\mysql-5.6.24-win32\bin;
F:\mongodb2.6.9\bin\;
F:\python2.7.12;
F:\python2.7.12\Scripts\ (be sure to configure Scripts)
Can be configured according to their own installation directory, do not blindly follow. Once configured, open the cmd window, enter Python, and then get the Python version number to indicate that the installation was successful
So how to know if the Python management tool PIP is installed, can I enter PIP in cmd, you can run the description of success, this section can refer to many online tutorials
*********************************************************************************************************
The next step is the installation of the reptile Framework Scrapy:
1, installation Setuptools
Open, CMD window, enter PIP to check if PIP is successfully installed, after success, then enter:
Pip Install Setuptools
Observe the CMD window if the successfully installed Setuptools indicates that the installation was successful.
2, Installation lxml
I would have thought that the following command would have succeeded in installing successfully but there was a problem:
Pip Install lxml
This step took me one hours to install a problem, such as:
Fatal error: ' libxml/xmlversion.h ' File not found
On the internet for various reasons, there is great God is said not to install Libxml2-devel and Libxslt-devel, and not install libxml2 and libxslt files. In fact, the cause of the error also shows that the installation is not good LIBXML2
A variety of solutions, but for a long time, tried a lot of methods, and finally I refer to the
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2012-11/msg00520.html
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml (many Python-dependent library resources download)
Http://jingyan.baidu.com/article/cbcede07177b8702f40b4df9.html
finally resolves the problem, the steps to resolve are as follows:
1), first install the wheel, determine the installation success:
Pip Install Wheel
2), download the dependent library, you can #lxml中下载 in http://www.lfd.uci.edu/~gohlke/pythonlibs/
- LXML-3.6.4-CP27-CP27M-WIN32.WHL (python2.7 version, for WINDOWS32-bit systems)
- LXML-3.6.4-CP27-CP27M-WIN_AMD64.WHL (python2.7 version, for WINDOWS64-bit systems)
Then, put the downloaded dependencies in the Python installation package, and I'll put them in the F:\python2.7.12.
3), start installation lxml
Pip install F:\python2. 7.12\lxml-3.6. 4-CP27-CP27M-WIN32.WHL
And then the installation was successful.
3, Installation Zope.interface
Pip install Zope. Interface
There is no problem with this step
4, installation Twisted
There was a problem installing twisted: Refer to document python2.7 install Twisted report to Microsoft Visual c++9.0 required and then resolve
Pip Install Twisted
5, Installation Pyopenssl
Pip Install Pyopenssl
6, Installation Win32py
This part is stuck, originally http://www.cnblogs.com/pang1567/p/4168768.html this post, no win32py This file, actually installs Pypiwin32
Pip Install Pypiwin32
7, Installation Scrapy
Pip Install Scrapy
It's finally time for excitement! After installing so many widgets, it was finally the protagonist's turn. And then it shows that the installation was successful.
Enter s return directly in Cmd crapy
. It's done. So happy
Reference stickers:
Http://coding.derkeiler.com/Archive/Python/comp.lang.python/2012-11/msg00520.html
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
Http://jingyan.baidu.com/article/cbcede07177b8702f40b4df9.html
Http://www.cnblogs.com/pang1567/p/4168768.html
Http://stackoverflow.com/questions/26669972/install-pywin32-with-pip-in-windows-7-does-not-work-in-python-3-4-2
python2.7 installing twisted Report Microsoft Visual c++9.0 required
How to build a crawler frame scrapy on a 32-bit Windows system?