[英]Importing Modules, “No module named x”, even though I have it
The last question I posted, I had faith that this community would find an answer and it did, However, the problem I have today.我发布的最后一个问题,我相信这个社区会找到答案,它确实找到了答案,但是,我今天遇到的问题。 I am not too hopeful for.我并没有太大的希望。 I have several modules installed dealing with mouse clicking.我安装了几个处理鼠标点击的模块。 I try to import them but it just reads no module named 'pymouse' (example of one I have), I have edited variable paths, change the path of the module, changed the name, install-reinstalled, used different IDEs.我尝试导入它们,但它只是读取没有名为“pymouse”的模块(我有一个示例),我编辑了变量路径,更改了模块的路径,更改了名称,重新安装,使用了不同的 IDE。 and watched SEVERAL videos.并观看了几个视频。 And I still can't use a module I installed with pip, However, there is another problem, a singular built-in module to python that I did not need to pip install.而且我仍然无法使用我用 pip 安装的模块,但是,还有另一个问题,python 的单个内置模块,我不需要安装 pip。 doesn't work, Curses, the module, also won't work.不起作用,Curses,模块,也不起作用。 and it is the only built-in one that doesn't, I am asking for help.它是唯一没有内置的,我正在寻求帮助。 but also why the only modules that don't work are ones I install and ones that deal with mouse clicks, I use spyder as an IDE, python 3. and a newbie.而且为什么唯一不起作用的模块是我安装的模块和处理鼠标点击的模块,我使用 spyder 作为 IDE、python 3. 和新手。 Please help.请帮忙。
Picture of output after me trying to import Pymouse在我尝试导入 Pymouse 之后 output 的图片
You need to make sure you installed the modules into the python editor that you are using.您需要确保将模块安装到您正在使用的 python 编辑器中。 If you install it into a different one, the one you are using won't have the module.如果您将其安装到另一台,您正在使用的将没有该模块。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.