Не могу импортировать PyQt5 на Raspberry Pi с Python 3.6.5 - PullRequest
0 голосов
/ 06 июля 2019

Я пытаюсь запустить небольшое приложение PyQt на Raspberry Pi с jesse, но не могу заставить модуль PyQt5 импортировать в Python 3.6

pi@raspberrypi:~ $ cat /etc/debian_version
8.0

pi@raspberrypi:~ $ python3 --version
Python 3.6.5

pi@raspberrypi:~ $ sudo apt-get install python3-pyqt5
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pyqt5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

pi@raspberrypi:~ $ sudo apt-get install pyqt5-dev-tools qttools5-dev-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
pyqt5-dev-tools is already the newest version.
qttools5-dev-tools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

pi@raspberrypi:~ $ python3
Python 3.6.5 (default, Jul  4 2019, 01:11:28)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5 import QtCore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt5'
>>>

Мой оператор импорта неверен?Назван ли пакет как-нибудь еще?

1 Ответ

0 голосов
/ 06 июля 2019

Нет, ваше заявление на импорт не является неправильным. Нет, пакет (apt или pip) не имеет другого имени. Однако Python 3.6.5 - это не версия Python 3, поставляемая с Debian Jessie - это Python 3.4.2.

...