WSL2 question - downgrading python version [resolved]

Soldato
Joined
6 Dec 2003
Posts
2,645
I have tinkered with various distros of linux in the past but in the last few months i've been using WSL2 to go through some online course material. Right now i'm working through a section on Microservices / Kubernetes and having issues with the python version i installed or updated to earlier on in the course.

Anyone able to help confirm how i can downgrade from python3.10 to 3.7?

Have been trying to find a solution the past couple days and thought i'd got it working following this:

However, when i try and create the new venv i get the following error:
$ python3.7 -m venv ~/.MicroServicesProject
Error: Command '['/home/dan/.MicroServicesProject/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

Have tried using unlink and then ln to the alternative installation as per:
-rwxr-xr-x 1 root root 5.7M Jun 29 13:14 /usr/bin/python3.10
-rwxr-xr-x 2 root root 4.5M Oct 12 20:14 /usr/bin/python3.7m
-rwxr-xr-x 2 root root 4.5M Oct 12 20:14 /usr/bin/python3.7
lrwxrwxrwx 1 root root 18 Oct 17 21:49 /usr/bin/python -> /usr/bin/python3.7
lrwxrwxrwx 1 root root 19 Oct 17 21:56 /usr/bin/python3 -> /usr/bin/python3.10
 
Back
Top Bottom