I'd rather not use the python command. It's just points to the latest installed version and it doesn't even work on my pc. Use something like py -3.7 -m pip uninstall discord and py -3.7 -m pip install discord.py, since this will point to the specified python version and will use the pylauncher that installs with any installation of python3.
The Python ModuleNotFoundError: No module named 'discord' occurs when we forget to install the `discord.py` module before importing it. Summary When I try to import discord.py using import discord, I just get the output you can see below. Reproduction Steps Install discord.py using pip.
Then, I just open a python shell and type imp. This guide explains to install discord.py in various environments: Windows, macOS, Linux, Visual Studio Code, PyCharm, Anaconda, and Jupyter Notebook. We'll cover basic installation, voice support, troubleshooting common installation problems, and how to resolve the dreaded "ModuleNotFoundError: No module named 'discord'".
The import discord could not be resolved error is a common error that can occur when you try to import a Discord bot into your project. However, by following the steps in this guide, you can easily fix this error and get your Discord bot up and running. I originally thought I installed discord.py incorrectly through cmd, so I tried it again, but it told me that the requirement was already satisfied.
I'm not sure what was wrong with it, but I was hoping someone more experienced could help because this is my first personal python project. Learn about the error message 'import discord could not be resolved' and how to resolve it. Find possible causes, solutions, best practices, and error prevention.
I have tried everything to get discord.py installed but the pip install doesnt work then the import isnt working as it says there is no bash or command named import. It says that discord does not exist as an import despite discord.py existing in requirements.txt Troubleshooting and help help Bran_Muffins April 15, 2025, 6:01am. If you're running the script using Python 3.8, then the folder in.local would be automatically available for imports.
Have you checked that the script that imports discord is running under Python 3.8? Add a line like this.