ImportError: No module named 'PyQT5' Ubuntu 16.10

时间:2017-04-09 23:25:35

标签: python-3.x ubuntu python-3.5 pyqt5

I wanted to do some Python3 Development.

I did:

$ sudo apt-get install python3-pyqt5

But it doesn't work:

python3

$ python3
Python 3.5.2+ (default, Sep 22 2016, 12:18:14)
[GCC 6.2.0 20160927] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQT5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'PyQT5'
>>>

2 个答案:

答案 0 :(得分:2)

You need to pip install it :

pip3 install PyQt5

答案 1 :(得分:1)

Even though one often reads "QT", the package name is not "PyQT5" but rather "PyQt5" with a lowercase 't' at the end.