Python:ModuleNotFound错误 [英] Python: ModuleNotFound Error

查看:124
本文介绍了Python:ModuleNotFound错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了多个模块(Discord API,cx_Freeze)(pip下载,Windows 10),现在我想使用它们.

I downloaded multiple modules (Discord API, cx_Freeze) (pip download, Windows 10) and now I wanted to use them.

但是当我要导入它们时,它说没有任何模块.

But when I want to import them, it says there isn’t any module.

从我以前的Python使用(在重置计算机之前),我添加了一个 pycache 文件夹,该文件夹可用于一个模块.我无法将其复制到其他模块.该怎么办?

From my former Python using (before resetting computer) I‘ve added a pycache folder and it worked for one module. I‘m not able to reproduce it for other modules. What to do?

  • 我在PC上只有一个Python版本(3.6.5).

  • I‘ve only one Python version (3.6.5) on PC.

我已经检查了\ site-packages文件夹,它们就在其中.

I‘ve checked the \site-packages folder and they‘re there.

推荐答案

如果您使用的是python3,请尝试使用

If you are using python3 then try downloading the library using

pip3安装libname

pip3 install libname

但是如果您使用的是python2,则使用

but if you are using python2 then install the library using

pip2安装libname或只是pip安装libname

pip2 install libname or just pip install libname

尝试使用这些命令并回复

try with these command and reply

这篇关于Python:ModuleNotFound错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆