![](/img/trans.png)
[英]Issues with PyQt4 + SIP on Windows 10: Could not find a version that satisfies the requirement SIP (from versions: )
[英]Could not find a version that satisfies the requirement PyQt4 (from versions: )
尝试为 python 2.7 安装 qt4 时(我需要运行一些其他开发人员编写的脚本):
$ sudo pip install PyQt4
Could not find a version that satisfies the requirement PyQt4 (from versions: )
No matching distribution found for PyQt4
附加信息:
$ 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
关于如何安装它的任何建议?
请注意,我已经尝试过这里提出的解决方案:
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.
我猜是因为它不是 windows 平台,不是吗? 我正在尝试将它安装在 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" .
我也试过:
$ 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.
所以问题可能是:如何安装正确的版本? 如何找到合适的数据包? 我的问题正是这个:我不知道如何在这片大森林中移动自己。 谢谢你的每一个建议。
默认情况下pip 在 Pypi上查找项目分布。 如果您要求pip install PyQt4
,那么您也可以在 PyPi 上手动查看此PyQt4项目的页面。 在那里,您最终会看到根本没有要下载的发行版,因此pip将无法在任何平台上为任何 Python 版本安装任何东西。 你需要寻找替代品。
您可以查看PyQt 项目的主页,最终会找到下载 PyQt4 源代码的页面。 此页面上有一个指向 PyQt4 的 Linux 源代码的链接,因此您可能想看看它,看看是否可以将它安装在您的系统上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.