0
使用PyQt5在Ubuntu中,我通過PIP安裝PyQt的如何安裝和在Linux中
pip3 install PyQt5
然而,我的劇本還在說:
Traceback (most recent call last):
File "/media/storage/Python/my_app.py", line 11, in from mainwindow import * File "/media/storage/Python/mainwindow.py", line 4, in from PyQt5 import QtCore, QtWidgets
ImportError: No module named PyQt5
然後我從終端嘗試:
sudo apt-get install python3-pyqt5
並得到它安裝:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pyqt5 is already the newest version (5.7+dfsg-5).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
如何說服PyCharm 2017.1使用PyQt5?我只是意識到它的工作原理,如果我從終端運行它:
python3 my_script.py