How to determine which Python install is being used by the interpreter? [duplicate]
问题 This question already has answers here : Find full path of the Python interpreter? (3 answers) Closed 3 years ago . 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,