Could not find a version that satisfies the requirement PyQt4 (from versions: )
Asked Answered
H

2

6

When trying to install qt4 for python 2.7 (that I need to run some scripts written by other developers):

$ sudo pip install PyQt4

Could not find a version that satisfies the requirement PyQt4 (from versions: )
No matching distribution found for PyQt4

Additional information:

$ python --version
Python 2.7.15+

$ pip list
Package    Version
---------- -------
numpy      1.16.5 
pip        19.3   
pyqtgraph  0.10.0 
setuptools 41.4.0 
wheel      0.33.6 

Any suggestion on how to install it?

Please note that I have tried the solution proposed here:

pip install PyQt4-4.11.4-cp35-none-win_amd64.whl

ERROR: PyQt4-4.11.4-cp35-none-win_amd64.whl is not a supported wheel on this platform.

I guess because it is not a windows platform, isn't it? I am trying to install it on XUbuntu 18.04.

As suggested in one of the comment by @phd "PyQt4-4.11.4-cp35-none-win_amd64.whl is for Python 3.5 and Python 64-bit. You need to download wheel for Python 2.7".

I have tryed also:

$ pip install PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl

Requirement 'PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl' looks like a filename, but the file does not exist
PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl is not a valid wheel filename.

So the question can be: how to install the right version? How to find the right packet? My problem is exactly this one: I do not know how to move myself in this big forest. Thank you for every suggestion.

Hammock answered 15/10, 2019 at 12:50 Comment(9)
Possible duplicate of How to install PyQt4 on Windows using pip?Durkee
I have tried the solution in that answers: they do not solve the problem. I am updating the question to clarify itHammock
PyQt4-4.11.4-cp35-none-win_amd64.whl is for Python 3.5 and Python 64-bit. You need to download wheel for Python 2.7.Emlynn
@Emlynn Question updated. I have tried also with the 2.7Hammock
"looks like a filename, but the file does not exist" Provde the correct path to the downloaded file.Emlynn
@phd, you are absolutely right. The problem, as explained in the question, is that I do not know (1) how to find packets that cannot be installed through pip or conda install and (2) how to find the right path in this specific caseHammock
I'm voting to close this question as off-topic because Can I ask questions about installation in SO? Software tools commonly used by programmers and is a practical, answerable problem that is unique to software development.Yanirayank
@TrentonMcKinney, should I delete the question?Hammock
That's up to you. I doubt it will get a useful answer and it's probably going to be closed.Yanirayank
M
5

Building on sinoroc's answer: PyQt4 is outdated, and only PyQt6 or PyQt5 are available on PIP. See this website.

pip install PyQt6
Matland answered 12/12, 2021 at 2:55 Comment(1)
Well that was 1000x more useful to me than the existing answer! Thanks.Band
Q
3

By default pip looks for project distributions on Pypi. If you ask for pip install PyQt4, then you can also manually look at the page for this PyQt4 project on PyPi. There you will eventually see that there are no distributions at all to download so pip won't be able to install anything on any platform for any Python version at all. You need to look for alternatives.

You can have a look at the homepage of the PyQt project and you will eventually find the page to download the PyQt4 source code. There is a link on this page for the Linux source code of PyQt4, so you might want to have a look at it and see if you can get it installed on your system.

Qualification answered 15/10, 2019 at 14:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.