pip安装PyQt IOError

问题描述 投票:29回答:4

我正在尝试使用pip安装PyQt包,但是我收到此错误:

~$ 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
python pyqt pip ioerror setup.py
4个回答
12
投票

这是因为该文件有configure.py而不是setup.py。 configure.py生成一个make文件,用于通过将--qmake选项传递给configure.py来针对您选择的qt库构建pyqt,它也有不同的选项。我建议用pip维护者填写一个bug。


8
投票

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

brew install pyqt

4
投票

或者,您可以使用install PyQt4的二进制包管理器ActivePython

$ 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,就不需要编译。


0
投票

您可以在下载..google所需的版本后,将pip安装下载的pyqt版本的目录

© www.soinside.com 2019 - 2024. All rights reserved.