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

查看:10
本文介绍了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 安装库名

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

but if you are using python2 then install the library using

pip2 install libname 或者只是 pip install libname

pip2 install libname or just pip install libname

尝试使用这些命令并回复

try with these command and reply

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

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