简体   繁体   English

安装了Python的模块仍然无法使用它

[英]Python installed module still can’t use it

So I am kind of new to Python and I downloaded “Anaconda3”. 因此,我是Python的新手,我下载了“ Anaconda3”。 I added the Anaconda path the my environment variable. 我在我的环境变量中添加了Anaconda路径。

I tried to install 我尝试安装

pip3 install keyboard

And when I tried to import keyboard in my program, it says module not found. 当我尝试在程序中导入键盘时,提示未找到模块。 When I try to install it again, it say Requirement already satisfied. 当我尝试再次安装它时,它说要求已经满足。

Am I missing something? 我想念什么吗? I am new to python so I must be doing something wrong here 我是python的新手,所以我在这里一定做错了

Are you running the code with IDLE? 您是否正在使用IDLE运行代码? If you're running the code on a version of IDLE Python thats different from the Anaconda Python version, the modules installed will not be applicable. 如果您在与Anaconda Python版本不同的IDLE Python版本上运行代码,则安装的模块将不适用。

If you are new to python I fully recommend that you dont use Anaconda and use only IDLE for python, this way you don't have to worry about things like environment setup. 如果您是python的新手,我强烈建议您不要使用Anaconda,而仅将IDLE用于python,这样您就不必担心诸如环境设置之类的事情。

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

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