I have gotten these consecutive errors, despite having properly installed the required dev libs and the venv lib.
here is the consecutive output in terminal.
~/Desktop/virtualenvs$ python3.8 -m venv newpy38The virtual environment was not created successfully because ensurepip is notavailable. On Debian/Ubuntu systems, you need to install the python3-venvpackage using the following command. apt-get install python3-venvYou may need to use sudo with that command. After installing the python3-venvpackage, recreate your virtual environment.Failing command: ['/home/dji/Desktop/virtualenvs/newpy38/bin/python3.8', '-Im', 'ensurepip', '--upgrade', '--default-pip']When i run sudo apt-get to ascertain i have installed the venv library
~/Desktop/virtualenvs$ sudo apt-get install python3-venvReading package lists... DoneBuilding dependency tree Reading state information... Donepython3-venv is already the newest version (3.6.7-1~18.04).0 upgraded, 0 newly installed, 0 to remove and 458 not upgraded.When i run sudo apt-get to ascertain, again, i have installed the venv library
~/Desktop/virtualenvs$ sudo apt-get install python3.8-venvReading package lists... DoneBuilding dependency tree Reading state information... Donepython3.8-venv is already the newest version (3.8.0-3~18.04.1).0 upgraded, 0 newly installed, 0 to remove and 458 not upgraded.I have also tried the following links but to no avail:
- python3.8-venv not working with python3.8 -m venv env
- pyvenv not working because ensurepip is not available
- I have also resetted by locales with "sudo dpkg-reconfigure locales" as in https://askubuntu.com/questions/33025/locale-settings-are-not-right-how-can-i-reset-them. But this is likely unrelated.
=== Update ===Somehow, uninstalling and reinstalling python solved this venv issue. I am also not sure why.