In my quest to learn Python, I hit upon an early snag of not being able to access it in the command window / Powershell of my Windows 10 system.
I had downloaded Python 3.9.0 from python.org; during the installation process I made sure the option to establish a “PATH” was checked. Per various sources in my internet search, this should have been enough to avoid this particular issue.
Nonetheless, post-installation, when I entered “python” after the prompt in the command window, I was informed that “python” was not recognized.
My search on the internet gave me a partial solution, which was to add a “path” in Environment Variables.
To get there:
Windows System → Control Panel → System and Security → System → Advanced system settings → Environmental Variables… → System variables
Select the “Path” variable and Edit
From there I was to paste in the location (aka path) of the Python 3.9 .exe file on my computer.
Windows, however, appeared to have hidden the actual path of the Python .exe; I searched around for it in vain in File Explorer.*
The way I ended up identifying Python’s path was by going to the Downloads file and opening up the Python 3.9 installer I had used, which provided the location of where Python was to have been installed.
I typed in a couple layers of the path in File Explorer. Sure enough, I found the Python folder.
I copied and pasted, and added the Python path to the System Variables.
Then I opened the command window and got this:
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
I did a happy dance.
*I’ve since discovered at the Microsoft Support site that, yes, there are hidden files, but these can be made viewable in File Explorer by changing the default hidden folder and search settings.
As a test, I did this, then searched for “python”.
It turns out my original method was more efficient; the search produced a lot of options that I, novice that I am, would have to sort through in order to find the right path.