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
5,565 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
0 votes
1 answer

How can I find out the index of an element from row and column in Python?

You probably want to use np.ravel_multi_index: [code] import numpy ...READ MORE

answered Apr 16, 2018 in Python by charlie_brown
• 7,720 points
97 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 344 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 14,254 views