Stack Overflow's answer

译:

dist-packages is a Debian-specific convention that is also present in its derivatives, like Ubuntu. Modules are installed to dist-packages when they come from the Debian package manager into this location:

dist-packages 是 Debian特定惯例,这也存在于像是ubuntu上。 如果使用Debian软件管理器安装, 模块将被安装到 dist-packages:

/usr/lib/python2.7/dist-packages

Since easy_install and pip are installed from the package manager, they also use dist-packages, but they put packages here:

自从 easy_install 和 pip (注: 是python的软件管理其,python有许许多多的软件) 使用,他们也使用 dist-packages,但是 路径是:

/usr/local/lib/python2.7/dist-packages

From the Debian Python Wiki:

从  Debian Python Wiki:

dist-packages instead of site-packages. Third party Python software installed from Debian packages goes into dist-packages, not site-packages. This is to reduce conflict between the system Python, and any from-source Python build you might install manually.

dist-packages取代了site-packages。从Debian安装包安装的第三方的Python软件 被 安装到 dist-packages,不是 site-packages.这是为了减少,系统自带python 和 你手动安装的python 之间的冲突。

This means that if you manually install Python from source, it uses the site-packages directory. This allows you to keep the two installations separate, especially since Debian and Ubuntu rely on the system version of Python for many system utilities.

这就是说,如果你手动安装python,它会直接使用目录site-packages。这允许你让两个安装隔离开来,特别是因为Debian 和 Ubuntu 应用 python的系统版本 到 许多的系统实体。

查找Python 安装路径THIS

>>> from distutils.sysconfig import get_python_lib
>>> print(get_python_lib())

Python 安装路径, dist-packages 和 site-packages 区别的更多相关文章

  1. mac下Python安装路径的说明

    Python安装路径的说明 mac在安装Python时, 对不同的安装方式 不同的型号均会安装在不同的文件夹下 安装方式 路径 系统默认(2.7) /System/Library/Frameworks ...

  2. 查看Python安装路径

    由于笔者自己经常忘记了如何查看Python的安装路径,又经常会用到Python的安装路径,因此记录一下,我们可以在命令行模式下输入: >>> import sys >>& ...

  3. Mac查看Python安装路径和版本

    目录 #查看当前所有Python版本路径 appledeMBP:~ apple$ which python2.7 /usr/local/bin/python2.7 appledeMBP:~ apple ...

  4. linux查看python安装路径,版本号

    一.想要查看ubuntu中安装的Python路径 方法一:whereis python 方法二:which python 二.想要查看ubuntu中安装的python版本号 python

  5. 安装PIL库时提示python未注册错误(自定义python安装路径)

    import sys from _winreg import * # tweak as necessary version = sys.version[:3] installpath = sys.pr ...

  6. linux 查看python安装路径,版本号

    一.想要查看ubuntu中安装的python路径 方法一:whereis python     方法二:which python   二.想要查看ubuntu中安装的python版本号 python ...

  7. mac 查看python安装路径

    1.terminal : input: which Python 2.terminal: input : python  --->import sys  ----> print sys.p ...

  8. MAC中查看Python安装路径

    [admin@admindeMac:~]which  Python /usr/bin/Python

  9. mac查看python安装路径

    1.terminal : input: which Python 或者 which Python3 2.terminal: input : python  --->import sys  --- ...

随机推荐

  1. css基础示例代码

    选择器 引入方式 <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...

  2. Bogart SysPwd.vb

    Module syspwd Public Const STR_MASK = "MyFunction" '加密用字串 '預定義密碼長度 Public GintCheckPwd As ...

  3. Java内存原型分析:基本知识

    转载: Java内存原型分析:基本知识 java虚拟机内存原型 寄存器:我们在程序中无法控制 栈:存放基本类型的数据和对象的引用,但对象本身不存放在栈中,而是存放在堆中 堆:存放用new产生的数据 静 ...

  4. uva-331-枚举-交换的方案数

    题意:冒泡排序,最小交换数的前提下有多少用方案把数组变成从小到大的顺序, 注意: 3 2 1 3的下表是1  2的是2 1的是3  交换 3 2,那么第一个交换数是1 最小交换数=逆序数的和 那么,只 ...

  5. 网际协议版本4(IPv4)

    IP是一种不可靠的无连接数据报协议-一种尽最大努力交付的服务,尽最大努力一词的意思是IP分组可能会损坏,丢失,失序或延迟到达,并且可能给网络带来拥塞. 网络层的分组称为数据报.是一个可变长度的分组.由 ...

  6. centos73下php5.6安装GD库

    yum --enablerepo=remi-php56 install php-gd php-mysql php-mbstring php-xml php-mcrypt YUM安装的 找到了源  分分 ...

  7. 今天练手了下mysqlbinlog,标记下

    1 首先查看是否开启了 bin log 登录mysql后  使用命令 show variables like "log_%"; show binary logs; 2  确认开启了 ...

  8. 15. "wm_concat"_数据库中将查询出来的多条记录中的某个字段用","拼接起来

    例子: select wm_concat(roleid) from lbmember where userid = ? 值的形式:1,2,3 下面是把1,2,3转换为1;2;3select repla ...

  9. HTML5 浏览器接收的常用 content-type

    <1> 常见的设置方法 response.setHeader("content-type", 'text/html'); <2> 浏览器接收的常用 cont ...

  10. 21OGNL与ValueStack(VS)-静态方法访问

    转自:https://wenku.baidu.com/view/84fa86ae360cba1aa911da02.html 在LoginAction中增加如下方法: public static Str ...