How to determine which Python install is being used by the interpreter? [duplicate]

廉价感情. 提交于 2019-12-04 03:48:46

问题


I have several software packages that install various installs of Python. For example:

C:\Python27\ArcGIS10.1
C:\Python27\ArcGIS10.2
C:\Python27|ArcGISx6410.1

Using sys.version does not work for my case since I need to know where the actual install is located, not the version.

How can I determine which install my Python interpreter is using?


回答1:


What you want is sys.executable, which will give the path to actual interpreter executable.



来源:https://stackoverflow.com/questions/24895901/how-to-determine-which-python-install-is-being-used-by-the-interpreter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!