pip install PyQt IOError

2019-02-04 02:31发布

I'm trying to install PyQt package with pip, but I get this error:

~$ 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

4条回答
【Aperson】
2楼-- · 2019-02-04 02:50

If you're on Mac, you can use homebrew:

brew install pyqt
查看更多
SAY GOODBYE
3楼-- · 2019-02-04 02:51

That's because that file has a configure.py not a setup.py. configure.py generate a make file that you use to build pyqt against the qt lib you choose by passing --qmake option to configure.py, it has different options too. I suggest filing a bug with the pip maintainer.

查看更多
Rolldiameter
4楼-- · 2019-02-04 02:53

You can, alternatively, install PyQt4 using ActivePython's binary package manager.

$ 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
$

So long as you already have PyPM, no compilation required.

查看更多
Melony?
5楼-- · 2019-02-04 02:54

you can pip install the directory of the downloaded version of pyqt after you download it ..google for your desired version

查看更多
登录 后发表回答