您的位置:首页 > 编程语言 > Python开发

查看Python安装路径以及安装包路径小技巧

2018-10-12 13:50 846 查看

特别是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路径就好办了。

您可能感兴趣的文章:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: