运行python文件时出错:ModuleNotFoundError

问题描述 投票:-3回答:1

我正在尝试在Pycharm上运行Pyqt5文件,但在下面仍然出现此错误:

/Users/mustafa/.pyenv/versions/3.7.3/bin/python "/Users/mustafa/Library/Application Support/JetBrains/PyCharmCE2020.1/scratches/scratch.py"
Traceback (most recent call last):
  File "/Users/mustafa/Library/Application Support/JetBrains/PyCharmCE2020.1/scratches/scratch.py", line 10, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets, uic
ModuleNotFoundError: No module named 'PyQt5'

Process finished with exit code 1.    
python pycharm pyqt5
1个回答
0
投票

我认为您尚未安装QT5库,您需要从cmd安装它。

pip install PyQt5
© www.soinside.com 2019 - 2024. All rights reserved.