我曾经在 Ubuntu 18.04 LTS 上使用虚拟环境,但是我卸载了它并在 Windows 10 上安装了 Ubuntu 20.04 LTS。现在,当我创建一个 venv
时,出现错误。
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.
当我安装
sudo apt-get install python3-venv
时,它显示已安装但仍然存在严重问题。Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-venv is already the newest version (3.8.2-0ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.