I was working with virtual environments with Ubuntu 18.04 LTS but I uninstalled it and installed Ubuntu 20.04 LTS on windows 10, but now when I create venv then error is
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.when I install sudo apt-get install python3-venv it say installed but still struggling badly
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-venv is already the newest version (3.8.2-0ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 Answers
I'd suggest to add the deadsnake-ppa and install
sudo apt install python3.8-venv Stumbled on this while having the same problem.
The answer by @alexandre-b solved it for me. Wanted to post here because of this questions search ranking.
basically:
python3.* -m venv myvenvwhere * is your specific python version.
You can check your python version with
python3 --version Use:
virtualenv my1instead ofpython3 -m venv my1.cd my1source bin/activate