简体   繁体   English

如何在Windows上找到python安装路径?

[英]How to find the python installation path on windows?

On windows 10 I have python installed and working, but not in the standard place C:\\PythonXY . 在Windows 10上,我已经安装并运行python,但不在标准位置C:\\PythonXY

How to find out the location of the python installation? 如何找出python安装的位置?

You can do this: 你可以这样做:

>>> import sys
>>> sys.executable
C:\Python35\python.exe

Run where python in a console. 在控制台where python运行。

See also https://stackoverflow.com/a/304447/354577 另请参阅https://stackoverflow.com/a/304447/354577

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM