No module named discord.ext; Discord is not a package?

See original GitHub issue

Trying to run a bot i made in Python but when I run it, it can’t get past the first two lines?

Code: Traceback (most recent call last): File "discord.py", line 1, in <module> import discord File "C:\Users\Evan\Desktop\bots\discord.py", line 2, in <module> from discord.ext import commands ModuleNotFoundError: No module named 'discord.ext'; 'discord' is not a package

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
Harmon758commented, Jul 17, 2018

Rename your file to something else besides discord.py.

For future questions like this, you should join either the official discord.py server or the Discord API server for help, as the README recommends.

2reactions
Stan-1337commented, May 22, 2022

Or pip install discord.py

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'discord'
Go into the terminal and use: pip uninstall discord.py wait a few seconds so it can fully delete it, and then use pip...
Read more >
ModuleNotFoundError: No module named 'discord' in Python
The Python "ModuleNotFoundError: No module named 'discord'" occurs when we forget to install the discord.py module before importing it or ...
Read more >
ModuleNotFoundError: No Module Named 'discord' in Python
This simple command installs discord in your virtual environment on Windows, Linux, and MacOS. It assumes that your pip version is updated. If...
Read more >
There is no module named discord.... : r/Discord_Bots - Reddit
I installed pycord, and everything is reading properly, but it says there is no module named discord nor discord.ext when I run the...
Read more >
Error importing package - Python Forum
... line 2, in <module> from discord.ext import commands ModuleNotFoundError: No module named 'discord.ext'; 'discord' is not a package
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found