python - Comment utiliser virtualenv avec python3.6 sur ubuntu 16.04

Mots clés : pythonubuntuvirtualenvpython-3.6virtual-environmentpython

meilleur 5 Réponses python - Comment utiliser virtualenv avec python3.6 sur ubuntu 16.04

vote vote

96

 The virtual environment was not created successfully because ensure pip is not available.  On Debian/Ubuntu systems, you need to install the python3-venv package using the following command.       apt-get installpython3-venv    You may need to use sudo with that command.  After installing the python3-venv package, recreate your virtual environment.  
$ sudo apt-get install python3-venv 
Error Command: ['/home/wgetdj/WorkPlace/Programming/Python/myvenv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip'] 
$ sudo apt-get install python-virtualenv $ virtualenv --python=python3.6 myvenv 
sudo apt install python3.6-venv 
vote vote

89

apt-get update \ && apt-get install -y software-properties-common curl \ && add-apt-repository ppa:deadsnakes/ppa \ && apt-get update \ && apt-get install -y python3.6 python3.6-venv 
vote vote

72

sudo add-apt-repository ppa:deadsnakes/ppa    sudo apt-get update    sudo apt install python3.6 
sudo apt-get install python3.6-venv python3.6-dev python3.6 -m venv venv_name 
vote vote

70

LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 
source /etc/environment 
vote vote

53

E: Unable to locate package python3-venv 
sudo apt-get update  sudo apt-get install software-properties-common  sudo add-apt-repository ppa:deadsnakes/ppa  sudo apt-get update  sudo apt-get install python3.6 

Questions similaires