简体   繁体   中英

Can't install IMDbPY on windows

I'm having trouble installing IMDbPY on my windows computer. 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 IMDbPY Searching for IMDbPY Best match: IMDbPY 4.9 Adding IMDbPY 4.9 to easy-install.pth file

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. Building without Cython. ERROR: 'xslt-config' is not recognized as an internal or external command, operable program or batch file.

** make sure the development packages of libxml2 and libxslt are installed **

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

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.

When I try the Windows executable ( here ) it gives me what I assume is the same error, saying:

Runtime Error! R6034 An application has made an attempt to load the C runtime library incorrectly. 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.

Thanks a lot, 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 .

There are several solutions.

The first one is

  • Install Visual C++ 2008 (Express version is ok, but not 2010 or 2012)
  • Follow this instruction to install lxml, basically install iconv, libxml2, libxslt, and zlib from here , and then compile lxml
  • Install IMDbPy using pip or easy_install

The second solution is

  • Install lxml from here
  • Install IMDbPy using pip or easy_install

The third solution is

The forth solution is

  • Use the unofficial installer from the homepage . Warning: this may not install all the necessary dependencies. You have encountered error with an older version of the installer, try using the latest one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM