几天前我从 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: ['/home/user/.venv/bin/python3.5', '-Im', 'ensurepip', '--upgrade', '--default-pip']
我都试过了
sudo apt-get install python3-venv
还有
sudo apt-get install python3.5-venv
但这并没有解决我的问题。