安装了Pyqt5和Python,并将地址放入路径中,但是为什么它不在Pycharm上工作?
我已经安装了Pycharm和Python 3.10.2,我试图让Pyqt5从事Pycharm,但我遇到了一个错误,说
没有名为“ pyqt5”的模块。
我检查了命令提示 这就是我得到的:
需求已经满足:c:\ users \ wsup2 \ appdata \ local \ program \ python \ python \ python310 \ lib \ lib \ site-packages(5.15.6) Requirement already satisfied: PyQt5-sip<13,>=12.8 in c:\users\wsup2\appdata\local\programs\python\python310\lib\site-packages (from pyqt5) (12.10.1) 已经满足的需求:pyqt5-qt5&gt; = 5.15.2 in C:\ users \ users \ wsup2 \ appdata \ local \ local \ program \ python \ python \ python310 \ lib \ lib \ lib \ site-packages(来自pyqt5)
所以我添加了上述地址 (5.15.2)到达路径。
然后我尝试了:
pip3 show PyQt5
我得到了:
Name: PyQt5
Version: 5.15.6
Summary: Python bindings for the Qt cross platform application toolkit
Home-page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-email: [email protected]
License: GPL v3
Location: c:\users\wsup2\appdata\local\programs\python\python310\lib\site-packages
Requires: PyQt5-Qt5, PyQt5-sip
Required-by:
这就是我不确定我还应该做什么以使其在Pycharm上工作。
请帮忙。
I have PyCharm and Python 3.10.2 installed, and I'm trying to get PyQt5 to work on PyCharm but I get an error that says
No module named 'PyQt5'.
I checked on Command Prompt with 'pip install pyqt5'
and this is what I got:
Requirement already satisfied: pyqt5 in c:\users\wsup2\appdata\local\programs\python\python310\lib\site-packages (5.15.6)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in c:\users\wsup2\appdata\local\programs\python\python310\lib\site-packages (from pyqt5) (12.10.1)
Requirement already satisfied: PyQt5-Qt5>=5.15.2 in c:\users\wsup2\appdata\local\programs\python\python310\lib\site-packages (from pyqt5) (5.15.2)
So I added the above address to Path.
and I tried:
pip3 show PyQt5
and I got:
Name: PyQt5
Version: 5.15.6
Summary: Python bindings for the Qt cross platform application toolkit
Home-page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-email: [email protected]
License: GPL v3
Location: c:\users\wsup2\appdata\local\programs\python\python310\lib\site-packages
Requires: PyQt5-Qt5, PyQt5-sip
Required-by:
And that's where I'm not sure what else I'm supposed to do to make it work on PyCharm.
Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是因为Pycharm默认情况下在虚拟环境中启动新项目。
尝试在内置在Pycharm中的终端内运行相同的安装命令。
It is probably because Pycharm by default starts new projects in a virtual environment.
Try running the same install command inside the terminal that is built into Pycharm.