【发布时间】:2021-07-27 20:11:49
【问题描述】:
我正在关注 guide(2021 年 2 月更新)在 Digital Ocean 上托管我的机器人。关键是当我必须安装 python3 和 discord.py 时,它会给我这个错误。
root@LMIIBot:~# mkdir ~/.venvs
root@LMIIBot:~# python3 -m venv ~/.venvs/discord
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Failing command: ['/root/.venvs/discord/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
指南中是second step。
编辑:我做了推荐的命令,但它告诉我它已经过时了,我应该写什么?
root@LMIIBot:~# apt-get install python3-venv
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-venv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
【问题讨论】:
-
这个错误告诉你该怎么做
-
我做了那个命令,但它告诉我它已经过时了
-
您创建 venv 有什么原因吗?我的建议是如果你有问题就不要创建它
-
我在主机级别不是很有经验,我按照建议我创建它的指南进行操作。这是我为 discord.py 找到的唯一指南(其余都是 discord.js)
-
也许你应该先read about virtual environments,虽然我不认为你真的需要它们在主机中,我会跳过这一步
标签: ubuntu discord.py digital-ocean