This article is written not only to summarize the common installation problems of installing scrapy, but also to solve problems independently. The error from the start of the VS C + + version, to later run Pip install lxml on CentOS is slow (CentOS 7 is a virtual machine).
This is a common exception condition for installing lxml:
Computer environment: WIN10 64-bit
Python environment: Python version 2.7 64-bit system
Target: Install lxml (LXML-3.6.4-CP27-CP27M-WIN32.WHL)
The main step is two steps:
1: Installation tool WHEEL:PIP Install wheel
2: Installing LXML:PIP install LXML-3.6.4-CP27-CP27M-WIN32.WHL
"Expected" "will encounter the pit:
1, remember to install the wheel tool first
2, FILENAME.WHL isn't supported wheel on this platform
You can try to upgrade the PIP tool: python-m pip install--upgrade pip
3, the upgrade tool should be no problem, it should be noted that lxml version: cp27 for Python version 2.7; Win32 represents the version number supported by Python. lxml version can be downloaded to the website:http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
The second common installation exception scenario:
Note that the path to Pip.exe in window platform is C:\Python27\scripts\pip.exe
Error Microsoft VIsual C + + 9.0 required, following this blog (http://www.zhimengzhe.com/windows/112812.html), according to the blog post,
One is modified on the environment variable
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/21/04abba7f3834727f27db2d72705fab5c.jpg "title=" 9ae56df5ac7c8c9a3789e7aadf10db4a.jpg "alt=" 04abba7f3834727f27db2d72705fab5c.jpg "/>
2. Modify the source code
Open thepython installation directory/lib/distutilsmsvc9compiler.py file, locate the Find_vcvarsall function, and at the beginning of the function, add
Version = the number above, which is added as "Version = 14.0", so that you can use the
def find_vcvarsall (version): "" "find the vcvarsall.bat file at first it tries to find the productdir of vs 2008 in the registry. if that fails it falls back to the VS90COMNTOOLS env var. "" " version = 14.0 # #添加这行     VSBASE = VS_BASE % VERSION    ...&NBSP, .....
3. Installing vcforpython27.msi,:https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266
The third kind of error message
Could not the Find function xmlcheckversion in library LIBXML2. is LIBXML2 installed
Fatal error C1083:cannot open include File:libxml/xml.version.h
Please refer to stack Overflow
Https://stackoverflow.com/questions/33785755/getting-could-not-find-function-xmlcheckversion-in-library-libxml2-is-libxml2
Run
Pip Install C:\PATH\TO\DOWNLOADED\FILE\LXML-3.6.1-CP27-CP27M-WIN32.WHL
Fourth type of error message
Error:command ' c:\\users\\rainer\\appdata\\local\\programs\\common\\microsoft\\visual C + + for Python\\9.0\\VC\\Bin \\cl.exe ' failed with exit Status2
set staticbuild=true && pip install lxml
Original address: Http://stackoverflow.com/questions/20460890/lxml-install-on-windows-7-using-pip-and-python-2-7
If you had a compiler installed (tested with VS C + + Express), you can simply run:
set staticbuild=true && pip install lxml
as pointed out on documentation, Setting staticbuild
will tell to Lxml's installer to automatically download all its binary dependencies before build.
these lxml
binary dependencies, that should is present when installing from source, would be downloaded and build to Gether by the installer:
Libxslt
Iconv
Zlib
Libxml2
Bonus : It also works inside a virtualenv.
Like in CentOS (yum install libxml2-devlibxslt-dev), does the Windows operating system install Libxml2-dev,libxslt-dev.
The PIP installation tool is not available for a different installation tool.
Easy_install lxml
Refer to this blog post http://www.cnblogs.com/python-life/articles/4511314.html installed in Windows System installation scrapy.
After installing the Scrapy, Comb: The system gives you the error message is very important, error message + installed keywords (like scrapy) is the input to the search engine important content, there are more complex things, divided into small steps to one by one to complete.
This article is from "Jason's blog" blog, please be sure to keep this source http://jason83.blog.51cto.com/12723827/1983664
Windows installation scrapy Common error Summary