Skip to main content

[SOLVED] Issues with Python Path after installation

After installing python on freshly installed windows 10. I could not call the python command from the command line interface.

TL;DR: After a bit of trial and error. I figured; I had to make the python path the first entry in the list of path variables.

before: PATH=C:\Program Files (x86)\Intel\iCLS Client\;...C:\Users\Admin\AppData\Local\Programs\Python\Python37...;

After: PATH=C:\Users\Admin\AppData\Local\Programs\Python\Python37;C:\Program Files (x86)\Intel\iCLS Client\;...


The Python path story

I got a brand new windows 10 installation recently. I decided I was going to use this workstation to prepare for my python interviews.

So after a few clicks, I installed python3.7 from a local copy on my flash drive.

After installation, I expected that the environment variables will be set but it wasn't. I updated the path variables manually.

To my surprise, Python was still not recognized. Let me show you what my Path variables looked like.

image 1.1 Environment Paths

To resolve this issue, simply click the python path to highlight it, then click on the "Move Up" button. Move python up so it becomes the topmost item on the list.

Then open a new CMD and see your python command working.

The issue has been resolved. If you are still having issues, please visit this StackOverflow discussion for further assistance.


WHY DID THIS WORK? Read on

By default, some windows installations have a default expectation that Python's install directory is what we have highlighted below.


If Windows is unable to find Python in this directory, we are simply redirected to the Windows App store to download the latest python.

If you check our previous image, you will observe that this "App store" path comes before our Python path Hence it takes precedence when there is a conflict.

If we move our Python path to come before the "App store" path, then our python path will have higher precedence too. and this is what we have done. See image below:

C'est Fini.

It will be great to hear your experience on similar things, please drop a comment. Thanks.



Comments

Popular Articles

Issue with installing python-axolotl or python-axolotl-curve25519 on Windows

It is peeve amazing how many hours get burnt while trying to resolve simple package dependency issues. I may be too dumb to proffer a lasting one-fits-all solution to all dependency issues, but I got this issue fixed in my own case. Problem Description: The python-axolotl library requires certain dependencies that are not properly managed when installing libraries via a command line's requirement.txt file. I got real help by reading through this link below, but this page might be more helpful when it comes to detailed instructions. Actual instructions: https://github.com/tgalal/python-axolotl Typical errors might look like the following: 1. In this case, missing library(s). Libraries needed for compiling some python resources. Unfortunately, http://aka.ms/vcpython27  has been decommissioned because Python2x is EOL. You can still get the VcPython27 from an archive at https://web.archive.org/web/20210106040222/download.microsoft.com/download/7/9/6/796EF2E4-801B-4F...

[SOLVED] Linux - Issues installing Docker on Ubuntu - libseccomp2 version 2.3.1 installed but 2.4 required

This article has been improved for a better understanding - goto  https://splashcoder.blogspot.com/2023/07/installing-docker-on-ubuntu-1804-solved.html There is a possibility that you are trying to install docker. There is a very comprehensive guide at https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository. The linked guide serves as a reference for this article. We try to address the common errors in this article. Just so you won’t have to scour the entire answers on StackOverflow. Step 1: The first thing is to run our famous "apt update" command. So run the command below. sudo apt-get update You may observe that there are some errors. And YES! we are using a fairly old Ubuntu 18.04 Bionic Beaver Release. It seems perfect for this as most people have issues installing docker anyways. To resolve this, you may refer to  Configure DNS server IP to resolve errors with apt-get update Step 2: Following the Docker article, we should run the commands below. sudo...

VS CODE: Unable to install extensions on Ubuntu/Linux

Hey, its one of those days, i just wished i could code away the night. i decided that tonight, it was going to be VS Code all through. I closed Sublime text. It was not long before I started missing the php code linting and ever intelligent code completions that were built into sublime text. I checked the suggestions on the Extensions Tab of VS Code. and there it was! Felix Becker's "PHP IntelliSense" package. To my cute surprise, Upon clicking, the extension's description and Installation "Read Me" could not display correctly, 'twas as good as blank. All i could see was this: I thought, this is something light, so i started searching but then it was not better explained except for the GitHub issue which I found to be useful, Link is at the bottom of this page.  I hate to discover it was a DNS issue. How to detect the Issue Simply visit the URL below, if you are able to view the image on the page, then you are not affected by this issue. DNS Test URL: ht...