how can i solve this? iam trying run this command in vs code terminal but its keep giving this eror
PS C:\Users\Hesam\Desktop\cloud> python src/stats.py --chat_json C:\Users\Hesam\Desktop\chat ex\result.json --output_dir C:\Users\Hesam\Desktop\res.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
CodePudding user response:
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:\Users\Hesam\Desktop\chat ex\result.json --output_dir C:\Users\Hesam\Desktop\res.png
CodePudding user response:
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}\AppData\Local\Programs\Python\Python{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!