Python Forum

Full Version: I get the error when I try to open the sample Why can pyqt5 installed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Traceback (most recent call last):
File "C:\Python35\Lib\site-packages\PyQt5\examples\sql\connection.py", line 42, in <module>
from PyQt5.QtWidgets import QMessageBox
ModuleNotFoundError: No module named 'PyQt5'
>>>

I get the error when I try to open the sample
Why can
pyqt5 installed
first you need to install PyQt5:
pip install PyQt5
(Dec-25-2018, 10:32 AM)Larz60+ Wrote: [ -> ]first you need to install PyQt5:
pip install PyQt5

>>> pip install PyQt5
SyntaxError: invalid syntax
>>>
i get this answer
from command line, not from interpreter.

import from interpreter
install from command line