I'm trying to setup a venv with Python3.6 but receive the error that was already mentioned in various other posts such as here. Unfortunately, none of the proposed solutions worked.
I have installed the necessary packages
$ sudo apt install python3.6-venv
...
$ dpkg -l | grep "python3.6-venv"
ii python3.6-venv 3.6.5-5~16.04.york0 amd64 Interactive high-level object-oriented language (pyvenv binary, version 3.6)
I also installed python3-venv
(which is for python 3.5).
When now trying to setup the venv I receive
python3.6 -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.
Failing command: ['/home/User/Python/test/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']