How to add Python Path to Environment Variables in Windows 10
Why Stack Overflow recommends it
Stack Overflow users link it when someone gets 'python is not recognized' or pip/spyder not found errors in cmd on Windows and needs a quick walkthrough of editing PATH.
Recommended by 6 people across 5 different months, 2017 to 2023.
What it is
A short screen-recorded tutorial showing how to open the Windows 10 environment variable settings and add the Python install directory (and Scripts folder) to PATH. The presenter notes the same steps work for any program or directory you want quick access to from the command line.
What people said
Recommends Burhan Asif · 2017-07 · Stack Overflow · on “Run python scripts in windows”
[LINK] 1- open cmd 2-use cd to go to the file where your script is located( cd.. to go to previous folder and cd name to go to another folder ) 3-when you get there in cmd type 4-python filename.py if you are using anaconda instead of cmd use anaconda prompt adding python to path: 1-open windows explorer 2-on the left side left click this pc and choose properties 3-then go to advanced system settings 4-then at the bottom enviorment variables 5-if you are windows 10 there will be onedrive written at top and behind it path choose path 6-then click new 7-add python directory to the path and then python directory/scripts [this video] check this
Recommends Patrick Artner · 2018-05 · Stack Overflow · on “command line not recognizing python despite it being on my computer”
You need to either qualify the path to the exe you are using - or put the path to python.exe into the windows %path% variable so it looks for it there. You can google solutions to this with ease. - you can even watch it on the youtubs: [this video]
Recommends KhoiABC123 · 2019-08 · Stack Overflow · on “I can't use pip (Windows)”
I'm late now, but just add python to your environment variables. It´s explained in this short video, how to set up python to your environment variables: [this video] after that pip should work on your cmd prompt, without cd to "C:\Users\Admin\AppData\Local\Programs\Python\Python36\Scripts"
Recommends MrNobody33 · 2020-06 · Stack Overflow · on “Installing numpy?”
Yes, you should try it. Here are some helpful links to add python path to enviroment variables: link 1 [LINK] , link 2 [LINK] , link 3 [this video] . Once you have done this, you should be able to use python in the cmd. Then, you should verificate if you have installed pip, as @SyKer said.
Recommends Pedro Pablo Severin Honorato · 2020-06 · Stack Overflow · on “Can't "install" plpython3u - postgresql”
Ok...I followed this video [this video] , I think its the same, right? The path was `C:\Users\developer\Anaconda3`, so I added that to the `PATH` variable, as shown in the video. Is this correct? If it is, do I have to do next in order to use python in postgres? (its a 2 min video btw)
Recommends Florian Fasmeyer · 2023-01 · Stack Overflow · on “Why is spyder not recognized as an internal or external command when installed as standalone?”
QUICK AND DIRTY: You could add spyder to your environment variables (so whatever console you write 'spyder' in will work) find the .exe of spyder and follow the procedure: [this video]
Cites Mwspencer · 2018-03 · Stack Overflow · on “Python only works for Admin”
I followed this video: [this video] and got my cmd to recognize python as a path variable. But this only works if I open cmd and powershell as an Admin. How do I get it to work for all users? As Admin: PS C:\windows\system32> python Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> As user: PS C:\Users> python python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + python + ~~~~~~ + CategoryInf
Cites mountainclimber11 · 2019-01 · Stack Overflow · on “How to run python scripts without specifying their full path”
From the cmd window I have to do this every time I run a script: C:\>cd C:\Users\my name\AppData\Local\Programs\Python\Python37 C:\Users\my name\AppData\Local\Programs\Python\Python37>python "C:\\Users\\my name\\AppData\\Local\\Programs\\Python\\Python37\\scripts\\helloWorld.py" hello world How can I get away from having to paste in all of the paths? I tried this and a few other things: [this video] thanks!
Cites furro · 2019-04 · Stack Overflow · on “What's wrong with my PATH setup? Error: ".. is not recognized as an internal or external command.."”
I've written a basic script, but whenever I try to run it in the terminal, I get this error : .. is not recognized as an internal or external command, operable program or batch file I believe I've downloaded and installed everything (python, pip, visual studio) correctly. I've set up my environment variables according to this video [this video] and according to the test he performs at the end, my path is set up correctly. I've tried restarting my computer, etc. I've scoured forums and watched youtube tutorials, and nothing seems to hit exactly on my problem. I don't think my code is faulty, but I can include some pictures of the error messages as well as some other info that may or may not be hel
Cites Anjali Shyamsundar · 2019-08 · Stack Overflow · on “Getting "OSError: [WinError 193] %1 is not a valid Win32 application" error even after reinstalling the right version”
This link might help: [this video] as mentioned here, go to path variable settings and see if you have python path set there. If so, remove it and add the new installation path (assuming you have the admin access to your windows machine).