简体   繁体   English

为什么“ModuleNotFoundError: No module named 'PyQt5'”错误一直显示?

[英]Why “ModuleNotFoundError: No module named 'PyQt5' ” Error keeps showing?

I tried to install PyQt5 in any possible way, but when I run the code, I get a traceback " ModuleNotFoundError: No module named 'PyQt5' "我尝试以任何可能的方式安装 PyQt5,但是当我运行代码时,我得到一个回溯“ModuleNotFoundError: No module named 'PyQt5'”

在此处输入图像描述

There are several things that could have gone wrong:有几件事可能出错:

  1. You installed the module incorrectly.您错误地安装了模块。 Have you used it before, or is this your first time importing it?你以前用过吗,或者这是你第一次导入它? Also, did the console/terminal say it was installed?另外,控制台/终端是否说它已安装? If you quit too soon, it will not download.如果您过早退出,它将无法下载。
  2. It is in the wrong folder.它位于错误的文件夹中。 If it downloads successfully, it should be with your other modules, in the lib or usr folder in python.如果下载成功,它应该与您的其他模块一起,在 python 的 lib 或 usr 文件夹中。 if you need a list of all modules, just use help("modules")如果您需要所有模块的列表,只需使用 help("modules")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM