未安装python3-venv ubuntu 14.04


22

全新安装ubuntu gnome 14.04,然后进行dist-upgrade

我尝试做的第一件事就是为python创建虚拟环境

python3 -m venv flask

给我

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.

这很奇怪,因为我认为venv是默认安装的,但是无论如何

sudo apt-get install python3-venv

给我

E: Unable to locate package python3-venv

我错过了什么吗?我的python安装有问题吗?我试图用Google搜索是否有回购协议或我需要的东西,但找不到。


3
packages.ubuntu.com/search?keywords=python3-venv说它适用于15.04及更高版本。
muru

Answers:


22

做:

sudo apt-get install python3.4-venv

然后您可以轻松地做到:

python3 -m venv flask

资源


7
不适用于Python 3.6
David D.
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.