Home > Back-end >  I cant install discord.py in Python 3.10.5
I cant install discord.py in Python 3.10.5

Time:06-26

So i tried to install discord.py in my PowerShell(Win10).

(I used pip install discord.py)

Im using python 3.10.5

Its just saying invalid syntax, marks install and closes the PowerShell.

Please Help Me

:)

CodePudding user response:

first try:

pip install discord

if that's no good, try the following options:

pip3 install discord
python -m pip install discord
python -m pip3 install discord

if none of these worked, try reinstalling pygame, and make sure that you click on the 'pip' checkbox. And the 'add to PATH' checkbox.

CodePudding user response:

According to the documentation

To install the library without full voice support

# Linux/macOS
python3 -m pip install -U discord.py

# Windows
py -3 -m pip install -U discord.py

Otherwise to get voice support

# Linux/macOS
python3 -m pip install -U "discord.py[voice]"

# Windows
py -3 -m pip install -U discord.py[voice]

CodePudding user response:

according to https://pypi.org/project/discord.py/ try

pip install discord.py

OR

# Linux/macOS
python3 -m pip install -U discord.py

# Windows
py -3 -m pip install -U discord.py

Otherwise to get voice support you should run the following command:

# Linux/macOS
python3 -m pip install -U "discord.py[voice]"

# Windows
py -3 -m pip install -U discord.py[voice]
  • Related