1. Home
  2. Boost Productivity with Essential Windows Tips & Tricks
  3. How to get python and pip working on windows

How to get Python and Pip working on Windows

We’ve got you covered if you’re a Python developer or a Windows user needing a Python interpreter and Pip to install various programs. This guide will show you how to get both Python and Pip working on Windows.

How to get Python

Python is available to Windows users. However, it is best installed via the Microsoft Store to avoid configuring things by hand. Currently, the Microsoft Store supports versions 3.11, 3.10, 3.9, 3.8, and 3.7. So, no matter what version of Python you need on Windows, you can get it.

Python 3.11

Python 3.11 is the most recent version of Python available to Windows users via the Microsoft Store. To install it on your computer, start pressing the Win key on the keyboard.

With the Windows app menu open, search for “Microsoft Store” and open it. Then, once the Windows store is open,  find the search box, and type in “Python 3.11.” You should see it in the search results.

Once you’ve located “Python 3.11” in the search results, select it with the mouse. Then, find the “Get” button, and click on it with the mouse. When you choose the “Get” button, the Microsoft Store will download and install this version of Python.

Python 3.10

If you need Python 3.10 on Windows, you can get it through the Microsoft Store. To start, press the Win key on the keyboard to launch the Windows app menu. Then, search for “Microsoft Store” and launch it.

Inside the Microsoft Store, search for “Python 3.10”. Then, select “Python 3.10” in the search results. Finally, select the “Get” button to install Python 3.10 on your Windows computer.

Python 3.9

Although getting a newer version of Python is generally a good idea, getting 3.9 through the Microsoft Store is possible if you need it. To start, open up the Microsoft Store on your computer.

Once the Microsoft Store is open, find the search box, and click on it with the mouse. After selecting the search box, type in “Python 3.9.” Lastly, select the “Get” button to download and install Python 3.9 on your computer.

Python 3.8/Python 3.7

 Python 3.8 and 3.7 are available in the Microsoft Store for Windows users. However, we strongly recommend not installing these versions and instead getting 3.11, 3.10, or 3.9. 

If you need these specific versions of Python for your Windows system, search for “Python 3.8” or “Python 3.7” in the Microsoft Store to install it.

How to use Python on Windows

To use the Python interpreter inside of Windows, open up Powershell. Once it is open, run the python command. The python3 command will also work.

python 

Or

python3

If you need to run a Python script, do the following:

python C:/path/to/python/script.py

How to install Pip on Windows

For quite a lot of Python-based programs on Windows, you will need Pip. Pip is the Python package manager; with it, Python dependencies and executables can easily be installed.

There are a few ways users can get Pip installed on Windows. However, the easiest and quickest way to get it working is with the Get-pip Python script. This script will detect your operating system, download everything, and set it up.

Before we go over how to use the Get-pip script, please look at its code. You must look at what the script does before running it, even if it is trustworthy.

To inspect the Get-pip script, head to the Get-pip page on Bootstrap.pypa.io. After downloading the script to your computer, open up Windows Powershell. Then, open up Windows Explorer.

Inside Windows Explorer, select “Downloads” to access your Downloads folder. Then, right-click on the “get-pip.py” file and select “Cut.” Selecting this option will copy the script to your Windows clipboard.

Once the file is in your Windows clipboard, find “This PC” and access it. Then, click on the “C:/” drive. When you’ve loaded up the “C:/” drive, right-click and select “Paste” to place the get-pip.py script.

Note: you will need to provide Explorer with Admin privileges when asked to paste the get-pip.py script in the “C:/” directory.

Return to Powershell and use the CD command to move into the “C:/” directory where the get-pip.py script is located. 

cd C:/

Once inside the “C:/” directory, you can run the ls command to view the folder’s contents. While this isn’t required, it will help you confirm that the get-pip.py script is where it needs to be.

ls

To install the Python package manager (Pip) on Windows with the script, ensure you have Python installed. Then, run the following command. Everything should be automated, so you will not need to interact with Powershell during this process.

python3 get-pip.py

How to use Pip on Windows

To use Pip on your Windows PC, start by opening up Powershell. Once it is open, you can run the pip command.

To install a Pip package, run the following: 

pip install package_name

To download a Pip package rather than install it, use the following:

pip download package_name

Lastly, to uninstall a Pip package, run this command:

pip uninstall package_name

For more information on commands, you can run with Pip on Windows and run the Pip –help command inside of Powershell. It will display a complete help page that explains everything you can do to use Pip.

pip --help

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.