In Ubuntu I installed PyQt via pip
pip3 install PyQt5
However, my script still says:
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
Then I tried from terminal:
sudo apt-get install python3-pyqt5
and got that it is installed:
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.
How to convince PyCharm 2017.1 to use PyQt5? I just realized it works if I run it from terminal:
python3 my_script.py