No module named 'dotenv' for Python 3.8

I’m getting an error when trying to run the script:

raise KeyError(key) from None

I’m unable to connect my Discord bot to the server. I have a .env file in the same directory as the script, but when I try to run it I’m getting the following error:


Has anyone run into this issue before or have any ideas on how to fix it?

The error KeyError: 'DISCORD_TOKEN' indicates that the key ‘DISCORD_TOKEN’ is not present in the .env file. Please make sure that you have correctly set the value of the ‘DISCORD_TOKEN’ key in the .env file and saved it.