问题
I have a script abc.py
under C:\Python\Python35\Scripts\
folder and I have C:\Python\Python35\python.exe;C:\Python\Python35\Scripts;C:\Python\Python35;
in my PATH
. Still I'm not able to execute the python from anywhere else otherthan its directory.
For example, I always have to go to C:Python\Python35\Scripts
and then execute python abc.py
. Else, it is giving below error -
python: can't open file 'abc.py': [Errno 2] No such file or directory
Any help here is much appreciated.
来源:https://stackoverflow.com/questions/40341154/execute-a-python-file-globally-from-any-path-windows7