python在我的机器上,我只是不知道在哪里,如果我在终端中键入python,它将打开python 2.6.4,这不在它的默认目录中,肯定有一种方法可以从这里找到它的安装位置?
我刚在c:usersappdatalocalprogramspythonpython36中找到我的
sys有一些有用的东西:
$ python
Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)] on win32
Type"help","copyright","credits" or"license" for more information.
>>> import sys
>>> sys.executable
'c:\\Python26\\python.exe'
>>> sys.exec_prefix
'c:\\Python26'
>>>
>>> print '
'.join(sys.path)
c:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg
c:\Python26\lib\site-packages
ose-1.0.0-py2.6.egg
C:\Windows\system32\python26.zip
c:\Python26\DLLs
c:\Python26\lib
c:\Python26\lib\pl