'Python is not recognized as the name of a cmdlet
My python is not recognized as the name of a cmdlet, when I uninstall the old version (3.9) to the new version (3.10), i have tried to update my path in the environment variable, but it still goes to the previous python (3.9)
here's my path :
PS D:\CodingFile> & C:/Users/amirc/AppData/Local/Programs/Python/Python39/Scripts/python.exe "d:/CodingFile/Python/Latihan Kuliah/Struktur-Data/amir.py"
& : The term 'C:/Users/amirc/AppData/Local/Programs/Python/Python39/Scripts/python.exe' 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:3
+ & C:/Users/amirc/AppData/Local/Programs/Python/Python39/Scripts/pytho ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:/Users/amirc/...ipts/python.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
the error occurs based on the information it is still on the old version path,can anyone help..
Solution 1:[1]
If you are using it in vscode you might have to tell it to change its interpreter. See this
Solution 2:[2]
mr freddy's answer is correct, but still can't run when I try manual, by opening visual studio code and running the program, more precisely I changed, python select interpreter, (CTRL + P, python: select interpreter) in visual studio code , and set global env, thanks all ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Silkyway |
| Solution 2 |
