How to Install Python on Windows WSL - A Passionated System Admin's Blog (2024)

In this post, I’ve outlined the steps for installing specific versions of Python on WSL in an easy-to-follow manner.

1. Install Windows Subsystem for Linux and Install Distro

In the Run dialog box, type optionalfeatures and press Enter. A window displaying Windows features will appear. Select ‘Windows Subsystem for Linux‘ from the list, proceed with the installation, and restart the system once the installation is complete.

Once the system is rebooted, in the command prompt, type

wsl.exe –list –online

which will list the available distros. From there, I will select the Ubuntu install.

wsl.exe –install Ubuntu

Once the installation is is finished, you’ll need to define the user name and password.

Anytime you can start the WSL system in the command prompt by typing wsl.exe in the command prompt.

[Resetting the WSL root password]

If you want to reset the password, you will need to start the WSL with the following command:

wsl.exe -u root

passwd root

2. Install Required package for Python

Since we’re going to install python by compiling source files, we’d need to install some dependencies packages like compiler and openssl. First update, the respository and links.

sudo apt upgrade

Install Compilers and packages.

sudo apt-get install libssl-dev openssl make gcc

3. Python Installation

We will download the python from official python site. From there you can select the specific version you want. Here I’ll go with the python3.8.9

Download the python and extract the files.

cd /mnt

wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz

tar xzvf Python-3.8.9.tgz

cd Python-3.8.9/

Now we will have a make file with the configure command which checks system configuration and sets up the build environment accordingly. The process takes some time, so be patient.

./configure

Here, we got the Make file, so now compile the source code and install binaries to the system with the following command.

sudo make install

4. Install Pip (Optional)

pip is an essential tool for Python development as it simplifies the process of managing external libraries and dependencies, making it easier to work with third-party packages and extend the capabilities of your Python projects. You can install it by:

sudo apt install python3-pip

How to Install Python on Windows WSL - A Passionated System Admin's Blog (2024)
Top Articles
Vice President of India | Government of India
How to turn off Cash App NFC tag?
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Dmv In Anoka
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Umn Biology
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Van Hayes

Last Updated:

Views: 6266

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Van Hayes

Birthday: 1994-06-07

Address: 2004 Kling Rapid, New Destiny, MT 64658-2367

Phone: +512425013758

Job: National Farming Director

Hobby: Reading, Polo, Genealogy, amateur radio, Scouting, Stand-up comedy, Cryptography

Introduction: My name is Van Hayes, I am a thankful, friendly, smiling, calm, powerful, fine, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.