ModuleNotFoundError: No Module Named 'discord'
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 >
Solution 1:
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
Solution 2:
sudo pip install discord.py
solves the problem
Solution 3:
Maybe it's the Python version issue.
When I tried running in python3.8 I got the same error. Switched over to 3.6 and it worked.
Solution 4:
I would use
pip install discord
instead of installing discord.py. Hope this works!
Solution 5:
check for python interpreter location in pycharm. Or install discord with sudo pip command
Post a Comment for "ModuleNotFoundError: No Module Named 'discord'"