he term 'python' is not recognized as the name of a cmdlet
Question:
how can i solve this?
iam trying run this command in vs code terminal but its keep giving this eror
PS C:UsersHesamDesktopcloud> python src/stats.py --chat_json C:UsersHesamDesktopchat exresult.json --output_dir C:UsersHesamDesktopres.png
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
i am just want to run this project
Answers:
at the very first in the place you typed "python" type py. I mean type py instead of python. I hope it will work
py src/stats.py –chat_json C:UsersHesamDesktopchat exresult.json –output_dir C:UsersHesamDesktopres.png
If you’re still having problems, try this:
- Searching for and click on
Edit the system environment variables
in the Windows search bar
- Click on
Environment variables
in the bottom right corner
- Scroll down under
User variables for {YOUR_USERNAME}
and double-click on Path
- On the right click
New
and enter in the path to Python on your computer (it should look something like this: C:Users{USERNAME}AppDataLocalProgramsPythonPython{VERSION}
) (If you’ve already done this, there should be a entry with the directory to Python already)
- Click
OK
on all opened windows and Apply
if allowed
- Restart your computer
If you need help finding your python directory, here is an article: https://datatofish.com/locate-python-windows/
Hope this helps!
how can i solve this?
iam trying run this command in vs code terminal but its keep giving this eror
PS C:UsersHesamDesktopcloud> python src/stats.py --chat_json C:UsersHesamDesktopchat exresult.json --output_dir C:UsersHesamDesktopres.png
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
i am just want to run this project
at the very first in the place you typed "python" type py. I mean type py instead of python. I hope it will work
py src/stats.py –chat_json C:UsersHesamDesktopchat exresult.json –output_dir C:UsersHesamDesktopres.png
If you’re still having problems, try this:
- Searching for and click on
Edit the system environment variables
in the Windows search bar - Click on
Environment variables
in the bottom right corner - Scroll down under
User variables for {YOUR_USERNAME}
and double-click onPath
- On the right click
New
and enter in the path to Python on your computer (it should look something like this:C:Users{USERNAME}AppDataLocalProgramsPythonPython{VERSION}
) (If you’ve already done this, there should be a entry with the directory to Python already) - Click
OK
on all opened windows andApply
if allowed - Restart your computer
If you need help finding your python directory, here is an article: https://datatofish.com/locate-python-windows/
Hope this helps!