When i run the code it says:
Traceback (most recent call last): File "C:\Users\Gebruiker\PycharmProjects\pythonProject\DiscordBot.py", line 1, in import discord ModuleNotFoundError: No module named 'discord'
idk how to fix this, please help me.
When i run the code it says:
Traceback (most recent call last): File "C:\Users\Gebruiker\PycharmProjects\pythonProject\DiscordBot.py", line 1, in import discord ModuleNotFoundError: No module named 'discord'
idk how to fix this, please help me.
You can install discord using:
pip install discord
If you are using anaconda, check your python interpreter from PyCharm. Go to File->Settings->Project Settings->Project Interpreter->Python Interpreters
Ensure to select correct version of python.exe
e.g.
For bare python (For this you need to install discord ) C:\Users\xxx\AppData\Local\Programs\Python\Python38\Lib
(a path similar to this)
For anaconda you'll see C:\Users\xxx\AppData\Local\Continuum\anaconda3\python.exe
Select the correct interpreter and you are good to go
In any case, i suggest you to take the time and learn about virtual environment https://docs.python.org/3/library/venv.html