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. 小朋友学Python(3)

    运算符 一.基本运算符 Python运算符多数与C/C++/Java类似,但有少数不一样. “/”表示求商,“//”求商的整数部分.11 / 2 = 5.500000, 11 // 2 = 5 “** ...

  2. web基础 (一) http协议

    一.什么是web服务 浏览器与网页服务端发起的请求与回应(返回的是一堆字符串,浏览器去渲染生成页面!)都是 标准的CS模式 ---- bs模式:客户端用浏览器即可,服务端需要自己去写 http协议是建 ...

  3. push(),pop(),unshift(),shift()

    1.push() 往数组末尾添加一个或多个元素,返回新的长度 2.pop() 删除数组末尾元素,数组长度减1,返回被删除的值 3.unshift() 往数组开头添加一个或多个元素,返回新的长度 4.s ...

  4. django-媒体文件,图片存储

    1.settings.py # 媒体文件 MEDIA_ROOT = 'media/'

  5. uva-10047

    我们考虑一个特殊情况,一个独轮车是一个圆环,独轮车靠这个圆环运动,这个圆环上涂有五个不同的颜色,如下图每个颜色段的圆心角是72度,这个圆环在MxN个方格的棋盘上运动,独轮车从棋盘中一个格子的中心点开始 ...

  6. php读取word里面的内容antiword

    其实是现在一个linux下的扩展 1 先安装  antiword yum antiword install 2 写测试php代码 header("Content-type: text/htm ...

  7. HTML5 Canvas ( 绘制一轮弯月, 星空中的弯月 )

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  8. docker 简单入门(一)

    本篇目录 写在最前面的话 docker概念介绍 镜像的概念.容器的概念 docker的安装介绍 写在最前面的话 大家好,首先跟大家说声对不起,我班门弄斧了,我本身是做系统开发,使用的语言是C#和JAV ...

  9. jsp访问java变量

    jsp页面中javascript访问 java的变量 <%= JAVA变量名%> jsp中嵌入java代码<%java代码%> --变量<% String JAVASOu ...

  10. 修改默认的inout输入框背景颜色

    https://www.cnblogs.com/beileixinqing/p/6119690.html