[英]Can't install IMDbPY on windows
I'm having trouble installing IMDbPY on my windows computer. 我在Windows计算机上安装IMDbPY时遇到问题。 I think there is something wrong with my c compiler, because when I try to install it with easy_install or pip it gives me an error along these lines: 我认为我的c编译器出了点问题,因为当我尝试使用easy_install或pip安装它时,沿着以下方向出现错误:
C:>easy_install IMDbPY Searching for IMDbPY Best match: IMDbPY 4.9 Adding IMDbPY 4.9 to easy-install.pth file C:> easy_install IMDbPY搜索IMDbPY最佳匹配:IMDbPY 4.9将IMDbPY 4.9添加到easy-install.pth文件
Using c:\\python27\\lib\\site-packages Processing dependencies for IMDbPY Searching for lxml Reading http://pypi.python.org/simple/lxml/ Reading http://codespeak.net/lxml Reading http://lxml.de/ Best match: lxml 3.1beta1 Downloading http://pypi.python.org/packages/source/l/lxml/lxml-3.1beta1.tar.gz Processing lxml-3.1beta1.tar.gz Running lxml-3.1beta1\\setup.py -q bdist_egg --dist-dir c:\\users\\alex\\appdata\\loc al\\temp\\easy_install-a8mii5\\lxml-3.1beta1\\egg-dist-tmp-0witf6 Building lxml version 3.1.beta1. 使用c:\\ python27 \\ lib \\ site-packages处理IMDbPY的依赖项搜索lxml阅读http://pypi.python.org/simple/lxml/阅读http://codespeak.net/lxml阅读http:// lxml。 de /最佳匹配:lxml 3.1beta1下载http://pypi.python.org/packages/source/l/lxml/lxml-3.1beta1.tar.gz处理lxml-3.1beta1.tar.gz运行lxml-3.1beta1 \\ setup.py -q bdist_egg --dist-dir c:\\ users \\ alex \\ appdata \\ loc al \\ temp \\ easy_install-a8mii5 \\ lxml-3.1beta1 \\ egg-dist-tmp-0witf6构建lxml版本3.1.beta1。 Building without Cython. 没有Cython的建筑物。 ERROR: 'xslt-config' is not recognized as an internal or external command, operable program or batch file. 错误:“ xslt-config”未被识别为内部或外部命令,可操作程序或批处理文件。
** make sure the development packages of libxml2 and libxslt are installed ** **确保已安装libxml2和libxslt的开发包**
Using build configuration of libxslt warning: no files found matching 'lxml.etree.c' under directory 'src\\lxml' warning: no files found matching 'lxml.objectify.c' under directory 'src\\lxml' warning: no files found matching 'lxml.etree.h' under directory 'src\\lxml' warning: no files found matching 'lxml.etree_api.h' under directory 'src\\lxml' warning: no files found matching 'etree_defs.h' under directory 'src\\lxml' warning: no files found matching ' .txt' under directory 'src\\lxml\\tests' warning: no files found matching 'pubkey.asc' under directory 'doc' warning: no files found matching 'tagpython .png' under directory 'doc' warning: no files found matching 'Makefile' under directory 'doc' cc1.exe: error: unrecognized command line option '-mno-cygwin' error: Setup script exited with error: command 'gcc' failed with exit status 1 使用libxslt的构建配置警告:在目录“ src \\ lxml”下未找到与“ lxml.etree.c”相匹配的文件警告:在目录“ src \\ lxml”下未找到与“ lxml.objectify.c”相匹配的文件警告:未找到文件在目录'src \\ lxml'下匹配'lxml.etree.h'警告:在目录'src \\ lxml'下找不到匹配'lxml.etree_api.h'的警告:在目录'src下找不到与'etree_defs.h'匹配的文件\\ lxml'警告: 在目录'src \\ lxml \\ tests'下找不到与' .txt'匹配的文件警告:在目录'doc'下没有与'pubkey.asc'匹配的文件警告:在'docpython '下没有与'tagpython .png' 匹配的文件目录'doc'警告:在目录'doc'cc1.exe下找不到与'Makefile'匹配的文件:错误:无法识别的命令行选项'-mno-cygwin'错误:安装脚本退出并显示错误:命令'gcc'失败并显示退出状态1个
Looking that error up, it seems people are usually recommended to install "python-dev", but as far as I can see that's just a linux package that I can't find for Windows. 查找该错误,似乎通常建议人们安装“ python-dev”,但据我所知,这只是我在Windows中找不到的Linux软件包。
When I try the Windows executable ( here ) it gives me what I assume is the same error, saying: 当我尝试Windows可执行文件( 在此处 )时,它给了我我认为相同的错误,说:
Runtime Error! 运行时错误! R6034 An application has made an attempt to load the C runtime library incorrectly. R6034应用程序尝试错误地加载C运行时库。 Please contact the application's support team for more information. 请与应用程序的支持团队联系以获取更多信息。
So I'm getting pretty frustrated and thinking I'll just rig up something with BeautifulSoup, but if anyone can tell me what I'm doing wrong I'd be very grateful. 因此,我感到非常沮丧,并认为我将使用BeautifulSoup来组装一些东西,但是如果有人可以告诉我我做错了什么,我将非常感激。
Thanks a lot, Alex 非常感谢Alex
You can install IMDbPY with pip because it depends on lxml
, which in turn can't be compiled and installed because you don't have a working C compiler & the development file for libxml2
and libxslt
. 您可以使用pip安装IMDbPY,因为它依赖于lxml
,而lxml
又不能编译和安装,因为您没有可用的C编译器以及libxml2
和libxslt
的开发文件。
There are several solutions. 有几种解决方案。
The first one is 第一个是
iconv, libxml2, libxslt, and zlib
from here , and then compile lxml
按照此说明安装lxml,基本上从此处安装iconv, libxml2, libxslt, and zlib
,然后编译lxml
pip
or easy_install
使用pip
或easy_install
安装IMDbPy The second solution is 第二个解决方案是
pip
or easy_install
使用pip
或easy_install
安装IMDbPy The third solution is 第三种解决方案是
The forth solution is 第四种解决方案是
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.