无法解析ModulenotFoundError
我有一个在Python中制作的个人项目,该项目在秋天工作并完成。它使用了两个模块,即“名称”模块和“ pygame”模块。 的情况下没有问题
import names
import pygame
我简单地将代码的顶部放在了我 。我能够很好地运行它,并为我的班级展示该项目。但是,几个月后返回项目后,我发现自己遇到了这样的错误:
ModuleNotFoundError: No module named 'names'
我已经搜索了一段时间,但我似乎没有做任何事情改变了问题。我认为我可能没有下载的模块的任何地方都满足要求,并且卸载和重新安装一无所有。我仍然对Python的来龙去脉相对较新,我知道我可能在PIP(或错误的位置)下载了这些模块或将它们导入错误,但我似乎无法在此处弄清楚我的问题。
I have a personal project made in python that I worked on and completed in the fall. It used two modules, the 'name' module and the 'pygame' module. I had no issues with simply having
import names
import pygame
at the top of my code. I was able to run it just fine and present the project for my class. However, after returning to the project after several months, I have found that I get errors like this:
ModuleNotFoundError: No module named 'names'
I have searched for quite a while and nothing I seem to do changes the issue. Everywhere where I think I might not have the modules downloaded have requirements satisfied, and uninstalling and reinstalling has done nothing. I am still relatively new to the ins and outs of python and I understand that I may have downloaded these modules wrong with pip (or in the wrong spot) or am importing them wrong, but I can't seem to figure out my issue here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论