2015-12-14 22 views
18

Ich konnte Linux Mint 17.3 64-Bit-Version von meinem Linux-Mint-16 bewegen. Das war lang erwartete Migration.Installieren Sie Python3-Venv-Modul auf Linux-Mint

Nach dem Umzug nach Linux Mint 17.3 kann ich das python3-venv-Modul nicht installieren, das den Ersatz für virtualenv in Python 3.x darstellt. In meinem Linux-Mint 16 hatte ich Zugriff auf pyvenv-3.4-Tool. Ich weiß nicht, wann ich dieses Modul in Linux mint 16 installiert habe.

Jeder konfrontiert dieses Problem?

python -m venv test 
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. 

[email protected] ~/devel $ sudo apt-get install python3-venv 
[sudo] password for izero: 
Reading package lists... Done 
Building dependency tree 
Reading state information... Done 
E: Unable to locate package python3-venv 

Antwort

58

Versuchen Sie diesen Befehl ausführen:

sudo apt-get install python3.4-venv 

Dann verwenden:

python3 -m venv test 

der Paketname ist python3.4-venv und nicht python3-venv.

7

Für 3.6 Python fand ich heraus, dass es ein locale Problem war, läuft dies:

export LC_ALL="en_US.UTF-8" 
export LC_CTYPE="en_US.UTF-8" 
sudo dpkg-reconfigure locales 

scheint das Problem zu lösen.

Quelle von this Antwort

+0

Wichtig zu beachten: Es löste mein Problem auf Ubuntu 16.04.3 Minimal. (Verwenden Sie 'sudo dpkg-reconfigure locale' e es funktioniert) – Lourenco

6

ich Python verwenden 3.6, so dass die folgende den Trick für mich getan hat: $ sudo apt-get python3.6-Venv

(das Problem war, dass apt- installieren get install python3-venv würde virtualenv für 3.5)