![](/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.