Discord.py: problem with pip and discord.py

Created on 9 May 2018  路  17Comments  路  Source: Rapptz/discord.py

when i install discord.py in my pc i have this error:
Microsoft Windows [Versione 10.0.17134.1]
(c) 2018 Microsoft Corporation. Tutti i diritti sono riservati.

C:Usersadmin>python --version
Python 2.7.15

C:Usersadmin>pip --version
pip 10.0.1 from c:python27libsite-packagespip (python 2.7)

C:Usersadmin>pip install discord.py
Collecting discord.py
Using cached https://files.pythonhosted.org/packages/97/3c/2a97b47fd8839f8863241857bbd6a3998d1de1662b788c8d9322e5a40901/discord.py-0.16.12.tar.gz
Collecting aiohttp<1.1.0,>=1.0.0 (from discord.py)
Using cached https://files.pythonhosted.org/packages/09/5a/7b81ea8729d41f44c6fe6a116e466c8fb884950a0061aa3768dbd6bee2f8/aiohttp-1.0.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "c:usersadminappdatalocaltemppip-install-y7k5jkaiohttpsetup.py", line 60, in
raise RuntimeError("aiohttp requires Python 3.4.2+")
RuntimeError: aiohttp requires Python 3.4.2+

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in

c:usersadminappdatalocaltemppip-install-y7k5jkaiohttp

what did i do wrong?

question

Most helpful comment

Sir i would like to point out that you are incorrect, both versions of discord.py are compatible with python 3.6 @JavascriptHero if you would like support join the discord.py server
edit:
never call yourself the python hero

All 17 comments

This library requires Python 3.4+, as mentioned in the README.You have 2.7.15 installed instead.
Install the correct version (3.6.5 at present) from the downloads page, and optionally remove your Python 2 installation to avoid confusion.

You need at least Python 3.4 to use Discord.py as mentioned in the readme

Hi, I'm having this issue on Python 3.7. Does this mean I'll need to downgrade?

The requirements for discord.py are >=3.4 and <3.7, as is stated in the README. For further help, please join the support server at https://discord.gg/r3sSKJJ.

The version of the library on pip does not work with python 3.7, you'll either have to downgrade your python or use the rewrite branch of the library.

To install the rewrite version of the library, use this command:

pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]

In the future, please don't necro issues, you should join either the official discord.py server or the Discord API server, as the README recommends.

Apparently it doesn't work on 3.6 either because I just installed that and same problem.

Please join the official discord.py server using the link I sent above to get more help.

I'm having the same issue. This library does NOT work on Python 3.6, confirmed by me.

As I am stating for the fifth time, please do NOT ask for help here, use the support server instead at https://discord.gg/r3sSKJJ.

Sir i would like to point out that you are incorrect, both versions of discord.py are compatible with python 3.6 @JavascriptHero if you would like support join the discord.py server
edit:
never call yourself the python hero

@JavascriptHero it does work, confirmed by me and about 5K people

@Elxafil Were you able to resolve it on your 3.6 installation?

@JavascriptHero please join the discord.py support server for more help https://discord.gg/r3sSKJJ

I'm in 100 servers already.

@twitch0001

Either leave one and join the discord.py support server or we are not going to help via github issues.
https://discord.gg/r3sSKJJ

This error is raised by setuptools when installing aiohttp because it declares the minimum version the library is compatible with, and your install target is not within that bracket.

Since even the most current version of aiohttp at this moment still supports >=3.5.3, this error appearing indicates that the real problem isn't that you don't have a suitable version, but that instead you have multiple versions on your machine and you're just installing to the wrong one.

Rather than using a generic executable like python or just py, try using one that explicitly tells your system what you're looking for:

Windows

Windows installs of Python come with the py launcher by default, which allows you to specify the version you're looking to execute a script or module on.

# Substitute '3.6' with the version you're looking for
# To use pip
py -3.6 -m pip install ...
# To execute a script
py -3.6 bot.py

If you don't know what versions you have, newer versions of the py launcher allow you to type py -0 to see your full version list.

Linux

On Linux, executables like python are just symbolic links to the longer, full executable names. If we need a specific version, we can just use its full name.

# Substitute '3.6' with the version you're looking for
# To use pip
python3.6 -m pip install ...
# To execute a script
python3.6 bot.py

If you don't know what versions you have, try checking what executables are on your system using a command like ls -l /usr/bin | grep python. If that doesn't work, using which python will tell you where python leads, and you can try on that folder instead.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haaddaa1 picture haaddaa1  路  14Comments

SakiiR picture SakiiR  路  17Comments

Mercurial picture Mercurial  路  22Comments

xomien picture xomien  路  17Comments

ThePiGuy24 picture ThePiGuy24  路  17Comments