Python error "ERROR: Could not find a version that satisfies the requirement PyQt4 (from versions: none)"

+1 vote

I am trying to install PyQt4 on my python 2.7. But I end up with the following error:

ERROR: Could not find a version that satisfies the requirement PyQt4 (from versions: none)
ERROR: No matching distribution found for PyQt4
Jul 22 in Python by Rhea
8,557 views

Try installing from the terminal with the following command:

pip install pyqt4

I get this when I try installing using pip:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop
support for Python 2.7.
Collecting pyqt4
  ERROR: Could not find a version that satisfies the requirement pyqt4 (from versions: none)
ERROR: No matching distribution found for pyqt4

Try this:

pip install python-qt
Yes this works thanks

2 answers to this question.

+1 vote
Best answer

You cannot install PyQt directly from pip. Download the file according to your version from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4

And run install the .whl file with pip

answered Jul 22 by Bob

selected Jul 22 by Kalgi
Thanks Bob, that worked!
0 votes

QT does not support Qt4 anymore. But you can install PyQt5 instead:

pip install PyQt5
answered Jul 22 by Hitesh

Related Questions In Python

0 votes
1 answer
+1 vote
0 answers

Sum the values of column matching and not matching from a .txt file and write output to a two different files using Python

Name                                                    value DR_CNDAOFSZAPZP_GPFS_VOL.0 139264 DR_CNDAOFSZAPZP_GPFS_VOL.1 15657 DR_CNDAOFSZAPZP_GPFS_VOL.0 139264 DR_CNDAOFSZAPZP_GPFS_VOL.1 156579 DR_CNDAOFSZAPZP_GPFS_VOL.2 156579 DR_CNDAOFSZAPZP_GPFS_VOL.3 ...READ MORE

Nov 20 in Python by Sagar
• 130 points
99 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 405 views
+4 votes
6 answers
0 votes
1 answer

How to get the return value from a thread using python?

You don't need to change your existing ...READ MORE

answered Dec 3, 2018 in Python by Nymeria
• 3,520 points

edited Dec 19, 2018 by Nymeria 15,994 views