本文介紹了ModuleNotFoundError:沒有名為“不和諧"的模塊的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
嘗試從 CMD 運行我的 .py 文件,但找不到不和諧模塊
Trying to run my .py file from CMD, but it can't find the discord module
>>File 'C:Users\****DesktopDiscord_Botmain.py', line 1, in module
>>import discord
>>ModuleNotFoundError: No module named 'discord'
雖然,當我跑步時:
>>python
>>import discord
按預期工作,有什么建議嗎?
It works as intended, any suggestions?
推薦答案
進入終端使用:pip uninstall discord.py
等幾秒完全刪除,然后使用pip install discord.py
.應該工作
Go into the terminal and use: pip uninstall discord.py
wait a few seconds so it can fully delete it, and then use pip install discord.py
. Should work
這篇關于ModuleNotFoundError:沒有名為“不和諧"的模塊的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!