How to install python 3.11 on Ubuntu WSL

Nowadays there are many ways to run Linux/Windows to coexist. I recently started working on a new project gmail_unsubscriber for this I needed to revamp my environment setup and I needed python 3.11. Here are some steps to make it happen.

The default ubuntu on WSL is Ubuntu 20.04 and python3.8.

Install your Dependencies

First we need to install dependencies. This are required by the Python Packages we will install later.

If you have trouble at this stage because you don’t remember your root password, dont worry I created this guide on how to reset your root password on WSL Ubuntu, in case you forgot it.

Add a ppa to the repository to be able to later install the python3.11 package

Install Python 3.11

You should now be able to see which python version you installed

Install PyPi

You might need to add the folder where pipy got installed to the path.

You can check now if pipy is installed

Create a .venv in Python3.11

Inside your project you should now be able to create a .venv with python 3.11

Look into our other WSL Content you might like

Here is some other WSL related content you might like. If you are a developer getting more familiar with WSL, this content might be for you.

Leave a comment

Blog at WordPress.com.

Up ↑