【python】python安装lxml报错【2】

cl : Command line warning D9025 : overriding '/W3' with '/w'

lxml.etree.c

c:\docume~1\admini~1.chi\locals~1\temp\pip_build_Administrator\lxml\src\lxml\includes\etree_defs.h(14) : fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory

C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'

  warnings.warn(msg)

error: command '"C:\Program Files\Common Files\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe"' failed with exit status 2

 

https://pytools.codeplex.com/workitem/1520

http://stackoverflow.com/questions/20460890/lxml-install-on-windows-7-using-pip-and-python-2-7

 

 

按照如下方式可以安装lxml

http://stackoverflow.com/questions/20460890/lxml-install-on-windows-7-using-pip-and-python-2-7

However, they should work for various versions as the releases of python and other respective prerequisites change/evolve:

Install Python2.7:
Download the last release of Python2.7 (currently 2.7.6) from the downloads page HERE
Direct link for Win32 MSI installer -> HERE
Direct link for Win64 MSI installer -> HERE
Simply run the MSI to install python. It will register itself in the registry, and appear in Add/REmove Programs.
NOTE: my instructions that follow assume that you choose to install python to the default path of C:\python27\ when asked during the Python Installation Wizard
Add the C:\python27\ and C:\python27\scripts folders to the system path by adding those directories to the PATH environment variable from the Control Panel > System > Advanced System Settings link (Advanced Tab) > Environmental Variables (Button).
(OPTIONAL) Install OpenSSL:
Download Win32 OpenSSL page from HERE for your version of Windows and PC architecture
Download Visual C++ 2008 redistributables for your version of Windows and PC architecture
Download OpenSSL for your version of Windows and architecture (the regular version, not the light one)
Add the following (depending on your architecture) directory (or wherever you insalled to) to your PATH, the same way you added C:\python27 and C:\python27\scripts above:
32-bit:  c:\openssl-win32\bin
64-bit:  c:\openssl-win64\bin
Install Setuptools (get-pip.py should install Setuptools for you), but, just in case...
Download ez_setup.py HERE and save it in C:\python27\scripts
Run C:\python27\scripts> python ez_setup.py
Install PIP
Download get-pip.py from HERE and save it in C:\python27\scripts
Run C:\python27\scripts> python get-pip.py
Install LXML
Download LXML 3.3.3 from HERE for your version of Windows and PC architecture
Run the EXE file

 

转载于:https://www.cnblogs.com/silenceli/p/4140077.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值