我在 Ubuntu 17.04 上安装了 python 3.6。现在,我正在尝试使用命令创建虚拟环境:
python3.6 -m venv env
Run Code Online (Sandbox Code Playgroud)
但我收到以下消息:
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: ['/home/makeev/test2/l/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']
Run Code Online (Sandbox Code Playgroud)
sudo apt install python3-venv 没有帮助,我安装了这个包。