查看Python安装路径以及安装包路径小技巧
特别是linux系统,装了多个python,有时候找不到python的绝对路径,有时候装了个django,又找不到django安装到哪里了。。当然查看的方法有很多种,这里列出几种,供没有经验的人参考下。
代码如下:
G:\code\moniter>python -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())" C:\Python27\Lib\site-packages G:\code\moniter>python -c "import os; print os.__file__" C:\Python27\lib\os.pyc G:\code\moniter>python -c "import sys; print sys.executable" C:\Python27\python.exe
其实只要知道python home路径就好办了。
相关推荐
huavhuahua 2020-11-20
weiiron 2020-11-16
cakecc00 2020-11-15
千锋 2020-11-15
JakobHu 2020-11-14
guangcheng 2020-11-13
xirongxudlut 2020-11-10
solarLan 2020-11-09
pythonxuexi 2020-11-08
文山羊 2020-11-07
susmote 2020-11-07
wuShiJingZuo 2020-11-05
Pythonjeff远 2020-11-06
jacktangj 2020-11-04
lousir 2020-11-04
Noneyes 2020-11-10
ailxxiaoli 2020-11-16
chensen 2020-11-14
Nostalgiachild 2020-11-13