Rapptz / discord.py

An API wrapper for Discord written in Python.
http://discordpy.rtfd.org/en/latest
MIT License
14.81k stars 3.75k forks source link

ModuleNotFoundError: No module named 'discord' #1515

Closed Arthurdw closed 6 years ago

Arthurdw commented 6 years ago

Hello, I've installed Discord.py successfully but when I try to run the "Import discord" its says ModuleNotFoundError: No module named 'discord' When I go to Project Interpreter it says Discord.py but I'm still unable to run the command. 75e50eb3a79fd7dd4e5db80ecb81b512 IMG link: https://i.gyazo.com/75e50eb3a79fd7dd4e5db80ecb81b512.png

SilicalNZ commented 6 years ago

async will not work on 3.7. See #1249 and #1401

Harmon758 commented 6 years ago

Are you importing it on the same Python version that you installed it on? i.e. Python 3.7 Also, Import discord with a capital I will raise a syntax error. And as @SilicalNZ noted, the async branch will not work as is with your current setup on Python 3.7.

For further help, you should join either the official discord.py server or the Discord API server, as the README recommends.

Arthurdw commented 6 years ago

@SilicalNZ @Harmon758 Do you suggest that I re-install Python from 3.7 to 3.5?

sethwheway commented 6 years ago

@Arthurdw Why would you install 3.5? 3.6.6 is the latest version that works with dpy

Arthurdw commented 6 years ago

@ItWasAllIntended The suggested version is 3.4 and 3.5.

I installed python 3.5 and it works now. (had to redo the discord.py 2) pythonversion

sethwheway commented 6 years ago

@Arthurdw For a start 3.5.6 so if you're going to get 3.5 use that. And second of all why do you think 3.4 and .3.5 are recommended. The Readme states 3.4.3+. There is no reason not to use 3.6.6 and you would be losing features and performance not using it.

Arthurdw commented 6 years ago

@ItWasAllIntended Thanks, I'm now running perfectly on 3.6.6! I didn't use these code's tho for my bot.

Arthurdw commented 5 years ago

*update for anyone who sees this. Async will work till version 3.6.x. If you want to have 3.7.x you will have to go the the rewrite libary, the rewrite libary has some other positive things too but it sacrifices the python 2.7.x support.

EDIT: For anyone reading this, I recommend using the rewrite library as this library is currently being supported by the dev and community. Since support for python 2 will be dropped at the end of this year in general it makes sense to use the rewrite library instead of the async library.

ghost commented 3 years ago

Im using Atom and it shows this error EEEEEEEEEEEEEEEEEEEEEEEEEEEEE

mesub7 commented 3 years ago

Please don't necrobump old, closed issues.

If you require support visit the discord server or go to the discussion page. I do use atom myself, so I would be willing to assist through the appropriate channels.