几天前,我从ubuntu 14.04升级到了ubuntu 16.04。当我尝试通过使用创建虚拟环境时
pyvenv .venv
要么
python3 -m venv .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.
Failing command: ['/usr/bin/python3.5', '-Im', 'ensurepip', '--upgrade', '--default-pip']
我尝试同时运行
sudo apt-get install python3-venv
和
sudo apt-get install python3.5-venv
但这并不能解决我的问题。