Virtual environment not working because ensurepip is not available

337 views Asked by At

I have seen other entries about this issue, but the solutions that worked for those people have not worked for mine.

I bought a new pi (revolution pi connect S) and have been struggling to create a virtual environment on it. When I try to create a virtual environment it says:

"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"

once I type sudo apt-get install python3-venv, I see that it accepts the command but it says 0 upgraded and 0 newly installed. When I try to create the venv again the same error pops up.

python --version shows python3.7.3, however even after doing the suggested:

sudo apt-get install python3.7-venv, I get the same error with an additional prompt:

python3.7-venv is already the newest version (3.7.3-2+deb10u6)

Does anybody know how to fix this?

I tried following the sudo apt-get install python3-venv command

tried the same command with multiple versions of python, (3.6,3.7, etc)

tried doing an uninstall with:

sudo pip freeze | grep -v "^-e" | xargs pip uninstall -y sudo apt-get remove python3.7 --purge sudo apt autoremove

but when I did python --version it still said 3.7.3, so it wasn't properly wiped

0

There are 0 answers