使用Visual Studio C ++ 2010 Express在Windows x 86(32位)上为Python 3.4安装lxml [英] Installing lxml for Python 3.4 on Windows x 86 (32 bit) with Visual Studio C++ 2010 Express
问题描述
相关
相关问题:
相关答案: p>
相关评论:
- 在Windows上构建Python 2.7的lxml
- @ ziyuang这意味着你使用的是使用Microsoft Visual Studio 2010的Python 3.3。如果是这样,那么答案是肯定的,你应该安装这个版本。
事实
- Windows x86位)
- 安装了Visual Studio C ++ 2008(从这里)Express和Visual Studio C ++ 2010(从这里)
- Python 3.4.1(显然使用比Visual Studio 2008更新的版本编译)
- 我使用pip .4.exe; distutils使用Visual Studio C ++ 2010 Express编译
我的错误的最后几行由pip记录:
cl :命令行警告D9025:覆盖'/ W3'与'/ w'
lxml.etree.c
C:\Users\NATHAN〜1 \AppData\Local\Temp\pip_build_nathanielanderson\lxml\src\lxml\includes\etree_defs.h(9)
:fatal错误C1083:无法打开包含文件:'libxml / xmlversion.h':
无此文件或目录
C:\Python34\lib\distutils \dist.py:260:UserWarning:Unknown
distribution option:'bugtrack_url'
warnings.warn(msg)
错误:命令'C:\Program Files \ Microsoft Visual Studio
$ b所以我不能从.egg或通过编译...安装
10.0 \VC\BIN\cl.exe失败,退出状态2
Recourse
我也找不到这个版本的Python的Windows安装程序(exe或msi或其他)
- 不是这里在PyPi
- < s> Nor 这里在Chris的好网站
看起来像Chris 确实在此提供直接执行:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
谢谢,Chris!任何想法为什么我不能编译使用pip?
解决方案我也有这个问题,但上面提供的解决方法不适用于我
$ b这是我的系统配置:
- Win7 64bit
- python3.3
- visual studio 2013
尝试使用相关问题中的第一个链接中的方法,但它失败。这个方法是为vs2010创建一个系统变量,该变量实际上是从Visual Studio 2013中的原始配置复制的。
但是,命令行提示错误libxml / xmlversion.h没有吸引文件或目录
然后我进一步在互联网上搜索,并得到一个方法,在我的情况下。
下载预编译的lxml插件
预编译的lxml 3.5 : https://pypi.python.org/pypi/lxml/3.3.5#downloads
如果您的系统是64位的,那么您可以在此处获取x64的非官方版本: http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml (这是我使用的)
使用命令安装命令行 easy_install lxml-3.2.1.win32-py3.3.exe
Related
Related questions:
Related answers:
Related comments:
- Building lxml for Python 2.7 on Windows
- "@ziyuang This would mean you use Python 3.3 which uses Microsoft Visual Studio 2010. If that's the case then the answer is yes, you should install this version."
Facts
- Windows x86 (32-bit)
- Installed both Visual Studio C++ 2008 (from here) Express and Visual Studio C++ 2010 (from here)
- Python 3.4.1 (apparently compiled with newer version than Visual Studio 2008)
- I use pip (or pip3.4.exe; builtin to Python 3.4) to
pip install lxml
- distutils uses Visual Studio C++ 2010 Express to compile
The last few lines of my error, logged by pip:
cl : Command line warning D9025 : overriding '/W3' with '/w'
lxml.etree.c
C:\Users\NATHAN~1\AppData\Local\Temp\pip_build_nathanielanderson\lxml\src\lxml\includes\etree_defs.h(9) : fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
error: command 'C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe' failed with exit status 2
So I can't install from the .egg or by compiling...
Recourse
I also can't find Windows installer (exe or msi or whatever) for this version of Python
Looks like Chris does provide a direct exe here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
Thanks, Chris! Any ideas why I cannot compile using pip?
解决方案I also got this problem, but the workarounds provided above are not work for me as well.
Here is my system configuration:
- Win7 64bit
- python3.3
- visual studio 2013
I tried to use the method in the first link in the Related questions, but it's fail. This method is to create a system variable for vs2010 use, and the variable is actually copy from my original configuration in visual studio 2013.
However, the command line prompted error with "libxml/xmlversion.h" no suck file or directory
Then I further searched it on the internet and got a method which works in my case.
downloading the precompiled lxml plugin
Precompiled lxml 3.5: https://pypi.python.org/pypi/lxml/3.3.5#downloads
if your system is 64bit, then you can get a unofficial version for x64 at here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml (this is what i use)
installing with command in command line easy_install lxml-3.2.1.win32-py3.3.exe
Reference: https://pytools.codeplex.com/workitem/1520
这篇关于使用Visual Studio C ++ 2010 Express在Windows x 86(32位)上为Python 3.4安装lxml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!