I have set the PATH environment variable:
C:\Users\zy>path PATH=e:\ProgramData\Anaconda3;e:\ProgramData\Anaconda3\Library\mingw-w64\bin;e:\ ProgramData\Anaconda3\Library\usr\bin;e:\ProgramData\Anaconda3\Library\bin;e:\Pr ogramData\Anaconda3\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\W bem;C:\Windows\System32\WindowsPowerShell\v1.0\;d:\Program Files\Process Lasso\; ;e:\Program Files (x86)\Microsoft VS Code\bin
I can successfully call python by Win+R and cmd, then enter 'python'
but if I call cmd in a directory by shift+right click, it will suggest 'python is not recognized as an internal or external command'
so when I run bat file in a directory, it can not succeed.
@echo off
python
pause
where python
in the cmd file which works? have you closed all the windows after having set your env. variable? that's one of the reasons software installers require you to reboot your PC / end your session, so changes can be properly propagated.where python
in a command where you're able to run it.python.bat
file somewhere? baaaad idea :)