• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WittySparks Logo White

WittySparks

Ignite Your Thoughts

  • Topics
  • Reviews
  • Newsletter
WittySparks / Technology / Programming / How to make Python3 version default in Windows OS?
developing programmer development coding technologies

How to make Python3 version default in Windows OS?

Updated: February 19, 2023 by Sairam Uppugudla

Python is known to be a Data Science programming language that effectively and simply solves algorithmic problems, or Python is used to develop web applications. Python is a universal programming language. Python eases the execution of code because of its built-in library functions in object-oriented programming.

Python has a large collection of library, and it keeps on upgrading. Due to this, there are many versions of Python and Pythonists sometimes find it difficult to make a particular Python version default. Through this write-up, let us understand how we can make the Python 3 version default in Windows operating system.

On this page

  • Step 1: Getting started from command-line
  • Step 2: Downloading relevant Python version
  • Step 3: Adding Python3 to the windows environment variable path
  • Step 4: Upgrade pip to be able to install Python modules

Step 1: Getting started from command-line

To check the Python version installed in your computer, you need to execute the following command command-line prompt:

py

You will be able to check the latest version of Python you have installed:

py -3

Step 2: Downloading relevant Python version

If in case, Python 3 is not installed in your system, try installing it from Python.org or follow this link https://www.python.org/downloads/windows/

Scroll down and download the executable file of the size of your windows (32-bit or 64-bit).

Download python for windows
Download python for windows

You only need to double click on the executable file and install it.

Step 3: Adding Python3 to the windows environment variable path

Now, when you have completed the installation of Python 3 in your system, let us see how we can add Python 3 version to the path. The default path will be:

C:\Users\This PC\AppData\Local\Programs\Python

Now, the above path is not convenient as AppData is a hidden folder that may cause problems with a few of the Python modules, such as Jupyter. Therefore, move it to a C drive (C:/)

Copy python modules in c-drive windows
Copy python modules in c-drive windows

Now, change the name of its executable to python3.exe.

Python3 .exe file
Python3 .exe file

Done? Now, Locate Environment Variables in your system. This will be done by right-clicking on “This PC” option in your computer and click on the Properties option. After doing this, click on Advanced System Settings under the Properties option.

Once you have done this, a pop-up will appear on the screen that will be displaying various options out of which you have to click on Environment Variable Option. The Environment Variables will open up and you can view all the system variables present there.

After clicking on the Path option, make sure to put the Scripts and Program Files path of different Python versions that you currently want to use and work in, and where you want to store all your necessary packages should be put first followed by others. Simply click on the Browse button and select the path of the Script folder and the Python3 itself.

Note: Remove any other Python Version available in the System variables, for example, Python2. Select its path and click on the Delete button.

Press the OK button to save the changes in the Windows’ Environmental Variables.Now, edit the environment variables to add new Python 3 to the path.

Python 3 environment variables - Windows
Python 3 environment variables – Windows
Windows environment variables
Windows environment variables
Python environment variables
Python environment variables

Add the two new variables as follows:

  • C:\Python38\
  • C:\Python38\Scripts

Now, click on OK button.

Python edit environment variables
Python edit environment variables

It’s time to open the command prompt:

Windows command prompt
Windows command prompt

When you type “python3” in the cmd, you should see the Python 3 interpreter opening:

Python3 in cmd
Python3 in command prompt.

Step 4: Upgrade pip to be able to install Python modules

If you are trying to run pip3 for this new python install, you could run into the following problem:

“Fatal error in launcher: Unable to create process”

Python fatal error in launcher
Python fatal error in launcher

Don’t worry! You can correct that by entering:

python3 -m install --upgrade pip

You pip will then will be upgraded and you will become able to install again Python modules.

Once this is done, restart your Command prompt and again type python,version. Now you will find the desired version there on the system and ready to be usable by the coder.

That’s all!

If you are facing any problem, leave a comment below.

Image source: Freepik Premium

Related Topics

  • PHP: Is it the best Programming Language ever?
  • How To Build A Great Search Box On Your Website
  • Latest Java Technologies & Trends for 2020
  • Facts about React Native you are still unaware of!
  • Top JavaScript trends for 2020
  • Expert Tips for Getting Started with HTML5 Game Development

Topic: Programming

Previous Post: « Tips to Increase the Efficiency of your Business Operations
Next Post: How Digital Dating Is Making A Move Amid Virus Outbreak? »
Profile picture for Sairam Uppugudla

About Sairam Uppugudla

CEO of CodeGnan
WittySparks Leadership Network Contributors

Entrepreneur, CEO, Data Scientist, or Data Enthusiast are the major features that describe Sairam Uppugudla the best. I am a tech expert with 7+ years of experience in multiple technologies like Data Science, Python, Data Analysis, Big Data, Machine Learning, NLP, etc. With 360 degrees of expertise in various technologies, I've been known for practical real-time projects. I love enjoying and exploring all about data. As an entrepreneur, my mission is to develop a culture of technology in the young and innovative minds who are our future.

View all posts by Sairam Uppugudla

Primary Sidebar

Featured Productivity Software

Notion logo
Notion

Notion Workspace can help you stay organized, get started today and take your productivity to the next level.

Try Notion for FREE

The Best Digital Marketing Tool

Semrush logo
Semrush

Grow your business on your terms and get to the top with 55+ marketing tools in 1. Get a flat 40% discount on Semrush Guru plan. No coupon code required. Or

Try Semrush for FREE

Footer

Affiliate Disclosure

If you make a purchase from WittySparks links, we will receive a small commission. See our Affiliate Disclosure.

Sponsors

Partnered with FreePik to use the licensed images.

turn to dhgate for smartphone

Follow Us

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn
  • Instagram
  • YouTube
  • RSS
  • Mastodon

Copyright © 2023 WittySparks - All rights reserved.
Hosted on Rocket.net

  • About Us
  • Contact Us
  • Privacy Policy
  • LinkedIn
  • Twitter
  • Like
  • Pinterest
  • Copy Link