21

I was able to move to Linux mint 17.3 64 bit version from my Linux mint 16. This was long awaited migration.

After moving to Linux Mint 17.3, I am not able to the install python3-venv module, which is said to be the replacement for virtualenv in python 3.x. In my linux mint 16 I had access to pyvenv-3.4 tool. I dont know when I installed that module in Linux mint 16.

Anybody faced this issue ?

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.

izero@Ganesha ~/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
Srikan
  • 2,161
  • 5
  • 21
  • 36

4 Answers4

64

Try running this command:

sudo apt-get install python3.4-venv

Then use this:

python3 -m venv test

the package name is python3.4-venv and not python3-venv.

nasser alshammari
  • 1,013
  • 10
  • 15
12

For python 3.6 I found out it was a locale issue, running this:

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

Seems to solve the issue.

Source from this answer

Community
  • 1
  • 1
Or Duan
  • 13,142
  • 6
  • 60
  • 65
  • Important to NOTE: It solved my problem on Ubuntu 16.04.3 Minimal. (use `sudo dpkg-reconfigure locale` e it works) – Lourenco Aug 21 '17 at 16:37
6

I use python 3.6 , and so the following did the trick for me: $ sudo apt-get install python3.6-venv

(the problem was that apt-get install python3-venv would virtualenv for 3.5)

Ofer Rahat
  • 790
  • 1
  • 9
  • 15
1
  1. Update all packages
sudo apt-get update
  1. Install virtual environment 3
apt-get install python3-venv
apt install virtualenv
  1. Check that it has been installed
virtualenv --version

Note: that this is for ubuntu 20 or variants

navarq
  • 1,075
  • 2
  • 15
  • 20