2013-02-07 148 views
1

我在Windows計算機上安裝IMDbPY時遇到問題。我覺得有什麼不對我的C編譯器,因爲當我嘗試使用easy_install的安裝或點子它給了我沿着這些路線的錯誤:無法在Windows上安裝IMDbPY

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

尋找這個錯誤了,似乎人們通常推薦安裝「python-dev」,但據我所見,這只是一個我無法在Windows上找到的Linux軟件包。

當我嘗試在Windows可執行文件(here)它給了我什麼,我認爲是同樣的錯誤,他說:

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.

所以我越來越漂亮沮喪和思考我就搭起用的東西BeautifulSoup,但如果有人能告訴我我做錯了什麼,我會非常感激。

非常感謝,亞歷克斯

回答

1

,因爲它取決於lxml,這反過來又可以不被編譯並安裝你可以用PIP安裝IMDbPY因爲你沒有工作的C編譯器&發展文件爲libxml2libxslt

有幾種解決方案。

第一個是

  • 安裝Visual C++ 2008(快速版本是好的,但不是2010或2012)
  • 按照此instruction安裝lxml的,基本上都是從here安裝iconv, libxml2, libxslt, and zlib,然後編譯lxml
  • 安裝IMDbPy使用pipeasy_install

在S的Econd溶液是

安裝LXML使用 pipeasy_install安裝IMDbPy

第三種解決方案是

  • 使用ActivePython並安裝IMDbPY

    第四解決方案是

    • 使用來自homepage非官方的安裝程序。警告:這可能不會安裝所有必要的依賴項。您遇到安裝程序較舊版本的錯誤,請嘗試使用最新版本的安裝程序。
+0

謝謝,明天會試試上面的一個。然而,根據你最後的建議,我嘗試使用最新的安裝程序,並遇到同樣的問題。此外,它似乎已經安裝了一些東西,我可以將模塊導入Python,但是當我嘗試運行它時,我得到一個「IMDbDataAccessError」。 –