PyQt5:ModuleNotFoundError:没有名为“PyQt5"的模块 [英] PyQt5: ModuleNotFoundError: No module named 'PyQt5'

查看:92
本文介绍了PyQt5:ModuleNotFoundError:没有名为“PyQt5"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 Python 3.7.1 并尝试运行使用 QTdesigner 创建的表单.但是发生了这个错误.我还使用

I have installed Python 3.7.1 and trying to run a form created using QTdesigner.But this error occurred.I have also installed PyQt5 module using

pip install PyQt5 

错误是:

from PyQt5 import QtCore, QtGui, QtWidgets   

ModuleNotFoundError: No module named 'PyQt5'

推荐答案

Python 和 pip 似乎运行在不同的版本上.

Python and pip seem to be running on different versions.

如果您使用的是各种版本的 Python,请使用python -m pip install PyQt5而不是 pip.

If you're using various versions of Python, use python -m pip install PyQt5 instead of pip.

这篇关于PyQt5:ModuleNotFoundError:没有名为“PyQt5"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆