Na verdade, é algo simples: QtWidgets
, ou seja, não singular
>>> from PyQt5.GUI import QtWidget
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'PyQt5.GUI'
>>> from PyQt5 import QtWidgets
>>>
Além disso, verifique se você está chamando o intérprete correto. Você instalou o PyQt5 para Python3, então use python3
:
$ python
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5 import QtWidgets
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PyQt5
>>>
$ python3
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5 import QtWidgets
>>>