pip3 install PyQt5
Collecting PyQt5
Using cached https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-b2zw891b/PyQt5/setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-b2zw891b/PyQt5/
Run Code Online (Sandbox Code Playgroud)
然后我从https://www.riverbankcomputing.com/software/pyqt/download5下载了 zip 文件夹并运行:
python3 configure.py --qmake /home/oo/Qt/5.14.0/gcc_64/bin/qmake
make
sudo make install
Run Code Online (Sandbox Code Playgroud)
成功的
>>> import PyQt5
>>> import PyQt5.QtCore
Traceback (most recent …Run Code Online (Sandbox Code Playgroud)