我无法在 ubuntu 服务器(数字海洋)上安装 discord.py

I can't install discord.py on an ubuntu server (digital ocean)

我正在关注此 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

找到解决方法:我只是没有完美安装python,刚好和我有同样问题的人按照this tutorial(对于ubuntu 20.04 )