在 Ubuntu 20.04 上为 python2 安装 pyqt5

在 Ubuntu 20.04 上为 python2 安装 pyqt5

我运行命令

pip install pyqt5

我收到以下错误

~$ pip install pyqt5

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement pyqt5 (from versions: none)
ERROR: No matching distribution found for pyqt5

请注意我真的需要Python2 pyqt5不是Python3 pyqt5,因为我得到的程序很旧。

感谢您的帮助! :)

答案1

您可以尝试为Python2构建pyqt5。在这里作者遇到了同样的问题,并编写了在 Linux 上为 Python2 构建它的步骤。

相关内容