7

I am about to start developing using PyQT, but there seem to exist two versions. Which one should I go for?

Also, I cannot seem to be able to install either, using pip install PyQt4 I get the following error:

Downloading/unpacking PyQt4
  Could not find any downloads that satisfy the requirement PyQt4
Cleaning up...
No distributions at all found for PyQt4
Storing complete log in /home/user/.pip/pip.log

Log says:

Exception information:
Traceback (most recent call last):
  File "/home/user/projects/pyqt-test-1/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/home/user/projects/pyqt-test-1/lib/python2.7/site-packages/pip/commands/install.py", line 236, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/user/projects/pyqt-test-1/lib/python2.7/site-packages/pip/req.py", line 1085, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/home/user/projects/pyqt-test-1/lib/python2.7/site-packages/pip/index.py", line 265, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for pyqt4

pip search pyqt lists at least PyQt4 so it gives me the impression that the package is in the list:

PyQt4                     - Python bindings for the Qt cross platform GUI toolkit

Is there any official way to install this thing on generic Linux? How do I do that?

Armen Michaeli
  • 2,452
  • 8
  • 32
  • 42

3 Answers3

14

I emailed rivercomputing:

If I try to installed PyQt4 via pip, I get the following message:

$ pip install PyQt4 Downloading/unpacking PyQt4 Could not find any downloads that satisfy the requirement PyQt4 No distributions at all found for PyQt4 Storing complete log in /home/jon/.pip/pip.log

However, if I search for PyQt4, the package is clearly there:

$ pip search PyQt4 ... ... PyQt4 - Python bindings for the Qt cross platform GUI toolkit python-qt - Python compatibility wrapper for Qt Bindings ... ...

The pypi page for this package is also reachable (https://pypi.python.org/pypi/PyQt4/4.10.3); however, I did notice that the download statistics are at 0.

How can I install PyQt4 via pip?

And got the following "not constructive" reply:

You can't.

Jon
  • 363
  • 4
  • 14
4

I think to install PyQt4, first of all you need sip. Information can be available from the riverbank computing website.

or if you are using Ubuntu/debian, you can get easily from the repositories :

sudo apt-get install pyqt4-dev-tools

tohuwawohu
  • 10,303
  • 1
  • 35
  • 63
dragfire
  • 61
  • 1
  • 7
1

I encountered the same problem. In the end I downloaded SIP and PyQt from riverbankcomputing.com, and installed them with:

python configure.py
make
make install
karel
  • 13,390
  • 26
  • 45
  • 52
Rest
  • 31
  • 1
  • I don't see how this answers the question. – David Richerby Mar 03 '16 at 05:20
  • I don't see how this doesn't answer [my] question? I ask at the end of my question post -- "is there any official way [to install] on generic Linux? How do I do that?". This is an honest attempt to describe a way to install it, whether `make & make install` can be considered "official" is at least debatable. What am I missing? – Armen Michaeli Mar 31 '19 at 10:56