- python2.x的查看方法:
#创建文件sys.py
import sys
print sys.path
- python3.x的查看方法::
#创建文件sys.py
import sys
print (sys.path)
- 结果:
$ python sys.py
['d:\\Python27', 'c:\\Program Files (x86)\\Python36-32\\python36.zip', 'c:\\Prog
ram Files (x86)\\Python36-32\\DLLs', 'c:\\Program Files (x86)\\Python36-32\\lib'
, 'c:\\Program Files (x86)\\Python36-32', 'c:\\Program Files (x86)\\Python36-32\
\lib\\site-packages']
- python的安装路径在:c:\Program Files (x86)\Python36-32