如何让windows使用特定的`python.exe`?

2024-05-26 11:55:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试了Control Panel\Programs\Default Programs\Set Associations,也尝试了assoc/ftype,但是windows一直使用错误的python.exeC:\Python27\),而不是我想要的(C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\

>where python
C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.exe
C:\Python27\python.exe
C:\Program Files (x86)\LilyPond\usr\bin\python.exe

>assoc .py
.py=Python.File.WinPython

>ftype Python.File.WinPython
Python.File.WinPython=C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7
.9.amd64\python.exe "%1" %*

>set PATH
Path=C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64;...C:\Python27;C:\Python27\Scripts;...C:\Program Files (x86)\LilyPond\usr\bin;...
PATHEXT=.PY;...

我刚编了Python.File.WinPython,可以吗?在


Tags: downloadsfilesprogramexeusersx86amd64file