14

I ran python3 -m pip install -U discord.py but it only installed discord.py v0.16.x. How do I install the new discord.py rewrite v1.0?

I uninstalled the old discord.py using pip uninstall discord.py and re-ran pip to install discord.py, only to get version v0.16.x again instead of the new v1.0 version.

Taku
  • 31,927
  • 11
  • 74
  • 85
Code Monkey
  • 800
  • 1
  • 9
  • 27

17 Answers17

19

Try using

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

That should go to the rewrite branch of the discord.py repository and get the egg file to install.

Patrick Haugh
  • 59,226
  • 13
  • 88
  • 96
  • 2
    I know what went wrong: I had to summon the yarl! `pip install -U "yarl<1.2"` before installing the new version of discord! It works now! Thank you for your help! – Code Monkey Jun 04 '18 at 19:57
3

If you still have a problem you can use :

python3 -m pip install -U https://github.com/Rapptz/discord.py/archive/rewrite.zip#egg=discord.py[voice]
noobie
  • 57
  • 2
  • 9
2

Open Command Prompt and type in;

pip install discord.py

or;

pip install discord.py==1.0.1

and then if you want voice do;

pip install discord.py[voice]

Snowsu
  • 94
  • 4
  • I believe this is the new correct answer. Following instructions at https://github.com/Rapptz/discord.py gave me v 1.1.1 – Robert Lugg May 28 '19 at 06:48
1

Try:

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

Or:

python -m pip install discord.py

If you are using PyCharm I think you should use the 2nd one

Emir Sürmen
  • 884
  • 3
  • 14
  • 33
1

As of 2021, the default install command:

pip install discord

Will install the "rewritten" (>1.0) version of discord.py

To update use the update command:

pip install discord --update
Zoe
  • 27,060
  • 21
  • 118
  • 148
Justin
  • 23
  • 1
  • 8
0

Easy, open Command Prompt and type "pip install discord.py" If you do that you're most probably going to want "pip install requests" If the pip command doesn't work, open your python installer and make sure to click on the add to evironment variables option! That's all your good to go! Use Visual Studio Code or Atom, they are the best so far that I have used for my bot!

TOG6
  • 3
  • 1
  • 5
0

I believe that discord.py rewrite is officially published based on its formal website information.

so, the command for installing the module will become pretty easy.

pip install discord.py

if you want to install a specific version. (the newest at this point is 1.3.4)

pip install discord.py==1.3.4

if you have an issue with the pip that cmd cannot recognize your pip command, then do this:

py -3 -m pip install discord.py

(but you need to have pip first anyway).

Based on its website, discord.py drops the support of python 3.4, it only supports python 3.5-3.8. Hope these information could help. :-)

TimG233
  • 535
  • 2
  • 12
0

Open CMD and go to the folder of your discord bot eg:

cd C:\Users\max\Desktop\DiscordBot

Next type this in CMD: pip install discord.py That should work

incarnadine
  • 658
  • 7
  • 19
  • It is unnecessary to change into any specific directory. `pip` installs globally. Also, the question asks to install the `rewrite` branch, you haven't included this in your answer – incarnadine Sep 17 '20 at 07:02
0
  1. Go to python.org and click on download python.

  2. Now, open and run it. Make sure you add python to the path. Click on Install. Once installed you can close it.

  3. Go to git-scm.com and click on Download for Windows.

  4. Once installed open it. Make sure Use git from windows command prompt is selected. Then after clicking on next on everything, click on install.

  5. Once install is finished, hit finish.

  6. Copy your script address. In my case, it was Local//Programs//Python//Python39//Scripts

  7. Open your command prompt and type cd Local//Programs//Python//Python39//Scripts. Paste your address there, mine will not work for you. Hit Enter.

  8. Then type py -3 -m pip install -U discord.py. Hit enter again. Once the install is finished close the command prompt.

Now you are ready to go ;)

RushR
  • 70
  • 4
  • 2
    The question assumes Python to already be installed. You are answering another question: "How can I install discord.py on windows?". This is not the question asked. – Maccesch Oct 24 '20 at 17:01
  • open command prompt and type ```pip install discord.py``` – RushR Oct 25 '20 at 05:33
0

Use:

py -m pip install discord.py
User
  • 141
  • 1
  • 9
0

Try Typing py -3.9 -m pip install discord.py[voice] --extra-index-url https://gorialis.github.io/pip/ in your CMD/Terminal. It worked for me. Credit to @Gorilias On Github.

The Peeps191
  • 153
  • 1
  • 8
0

This should work:

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

however if that fails I recommend updating pip and trying again.

0

If your also having trouble with all the above install python using the Microscoft Store and use the commands above in command prompt

skate
  • 3
  • 1
0

For really easiest way. Just type this in your command prompt or terminal.

pip install discord-ext-alternatives

and you should install this too

pip install discord

and when you're going to import it Just use this

import discord
from discord.ext import commands

bot \\or whatever your variable is this = commands.Bot(command_prefix="prefix here")
0

pip install discord.py Installing from the source[branch:master] is not recommended since it is in the testing phase(Writing as of 5/30/2021).If you want to test out buttons then sure go ahead and run pip install -U git+https://github.com/Rapptz/discord.py@master

-1

Make sure Python is in your system PATH.

python -m pip install -u discord.py
  • the PATH being incorrect, would stop execution of the command in question. It would not pull down a different version of a package than intended. – TeaBaerd Nov 03 '20 at 18:24
-1

İt is very easy actually. Open command prompt and write:

pip install discord.py

After that if you want voice:

pip install discord.py[voice]
Mehmet_faik
  • 29
  • 1
  • 3