查看python安装路径及安装的库

cmd下查看

python安装路径:where python

安装的库:pip  list 或者 pip freeze      pip list –outlated查看过时的库(pip list -h)

 

python查看: 

>>> import sys
>>> sys.path
[”, ‘D:\\python\\django\\mysite\\cmdb’, ‘C:\\Users\\Administrator\\AppData\\Loc
al\\Programs\\Python\\Python36-32\\python36.zip’, ‘C:\\Users\\Administrator\\App
Data\\Local\\Programs\\Python\\Python36-32\\DLLs’, ‘C:\\Users\\Administrator\\Ap
pData\\Local\\Programs\\Python\\Python36-32\\lib‘, ‘C:\\Users\\Administrator\\Ap
pData\\Local\\Programs\\Python\\Python36-32‘, ‘C:\\Users\\Administrator\\AppData
\\Roaming\\Python\\Python36\\site-packages’, ‘C:\\Users\\Administrator\\AppData\
\Local\\Programs\\Python\\Python36-32\\lib\\site-packages‘]

 

python 标准库位置: %python安装路径%\Lib

第三方库位置: %python安装路径%\Lib\site-packages

点赞