本文介绍了ModuleNotFoundError:没有名为"discord"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试从CMD运行我的.py文件,但找不到不和谐的模块
Trying to run my .py file from CMD, but it can't find the discord module
>>File 'C:\Users\\****\Desktop\Discord_Bot\main.py', line 1, in module
>>import discord
>>ModuleNotFoundError: No module named 'discord'
尽管,当我跑步时:
>>python
>>import discord
它按预期工作,有什么建议吗?
It works as intended, any suggestions?
推荐答案
我会使用
pip install discord
而不是安装discord.py.希望这行得通!
instead of installing discord.py. Hope this works!
这篇关于ModuleNotFoundError:没有名为"discord"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!