2011-04-01 32 views
27

我試圖用PIP安裝PyQt的包,但我得到這個錯誤:PIP安裝PyQt的IO錯誤

~$ pip install PyQt 

Downloading/unpacking PyQt 
Downloading PyQt-x11-gpl-4.8.3.tar.gz 
(9.8Mb): 9.8Mb downloaded Running 
setup.py egg_info for package PyQt 
    Traceback (most recent call last): 
     File "<string>", line 14, in <module> 
    IOError: [Errno 2] No such file or directory: 
'/home/john/build/PyQt/setup.py' 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 

    File "<string>", line 14, in 
<module> 

IOError: [Errno 2] No such file or 
directory: 
'/home/john/build/PyQt/setup.py 

---------------------------------------- Command python setup.py egg_info 
failed with error code 1 Storing 
complete log in 
/home/john/.pip/pip.log 
+1

有人添加一個問題在這裏:https://github.com/pypa/pip/issues/579 – 2012-10-02 20:50:24

回答

9

這是因爲該文件有一個configure.py不是setup.py。 configure.py生成一個make文件,用於通過將--qmake選項傳遞給configure.py來針對您選擇的qt庫構建pyqt,它也有不同的選項。我建議向pip維護者提交一個bug。

+3

澄清:你仍然可以通過手動下載並遵循其安裝說明來構建此包。 – 2011-04-01 21:03:09

+0

@hector它應該與PIP,該文件實際上來自河岸。他們沒有* nix二進制文件,只有窗口。 easy_install處理它很好ftr。 – 2011-04-06 19:47:05

+5

不允許easy_install不知道如何處理它 – 2011-04-30 05:51:32

3

您可以使用ActivePython的二進制包管理器替代地使用install PyQt4

$ pypm install pyqt4 
The following packages will be installed into "~/.local" (2.7): 
pyqt4-4.8.3.0 
Hit: [pypm-free.activestate.com] pyqt4 4.8.3.0 
Installing pyqt4-4.8.3.0 
$ 

只要你已經有PyPM,不需要編譯。

8

如果你在Mac上,你可以使用homebrew

brew install pyqt