[英]Unable to install discord.py with pip
我有 Python 3.8,每次我嘗試安裝 discord.py 時
py -3 -m pip install -U discord.py
它說:
> File "<stdin>", line 1
pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voic
^
SyntaxError: invalid syntax
使用pip install discord
。 如果您的機器上安裝了多個 Python 版本(如 MacOS),請使用 python 版本,然后使用命令。 例如(在 MacOS 版本和 Linux 上),使用python3.8
,使用python3 pip install discord
。 對於 Windows,如果您想指定在系統上使用python3.8
版本,則可以執行py -3 pip install discord.py
python3.8
。
做
pip install discord.py[voice]
在您的終端中。
也許只需轉到 Pypi 站點, 下載輪子並在您的文件現在所在的目錄中:
py -3 -m pip install -U discord.py-1.4.1-py3-none-any.whl
我使用 Python 3.8,我也有這個錯誤。 這樣做的方法是打開命令提示符並輸入pip install discord
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.