Python 安装路径, dist-packages 和 site-packages 区别
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:
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 区别的更多相关文章
- mac下Python安装路径的说明
Python安装路径的说明 mac在安装Python时, 对不同的安装方式 不同的型号均会安装在不同的文件夹下 安装方式 路径 系统默认(2.7) /System/Library/Frameworks ...
- 查看Python安装路径
由于笔者自己经常忘记了如何查看Python的安装路径,又经常会用到Python的安装路径,因此记录一下,我们可以在命令行模式下输入: >>> import sys >>& ...
- Mac查看Python安装路径和版本
目录 #查看当前所有Python版本路径 appledeMBP:~ apple$ which python2.7 /usr/local/bin/python2.7 appledeMBP:~ apple ...
- linux查看python安装路径,版本号
一.想要查看ubuntu中安装的Python路径 方法一:whereis python 方法二:which python 二.想要查看ubuntu中安装的python版本号 python
- 安装PIL库时提示python未注册错误(自定义python安装路径)
import sys from _winreg import * # tweak as necessary version = sys.version[:3] installpath = sys.pr ...
- linux 查看python安装路径,版本号
一.想要查看ubuntu中安装的python路径 方法一:whereis python 方法二:which python 二.想要查看ubuntu中安装的python版本号 python ...
- mac 查看python安装路径
1.terminal : input: which Python 2.terminal: input : python --->import sys ----> print sys.p ...
- MAC中查看Python安装路径
[admin@admindeMac:~]which Python /usr/bin/Python
- mac查看python安装路径
1.terminal : input: which Python 或者 which Python3 2.terminal: input : python --->import sys --- ...
随机推荐
- GSO/TSO/GRO等对VirtIO虚机的网络性能影响分析(by quqi99)
作者:张华 发表于:2016-04-05版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明 ( http://blog.csdn.net/quqi99 ) IP层 ...
- Coxph model Pvalue Select2
4 1) Put summary(coxphobject) into a variable summcph <- summary(coxphobject) 2) examine it wit ...
- 数据库之SQL笛卡尔积
1.笛卡尔积定义 笛卡尔积在SQL中的实现方式既是交叉连接(Cross Join).所有连接方式都会先生成临时笛卡尔积表,笛卡尔积是关系代数里的一个概念,表示两个表中的每一行数据任意组合,上图中两个表 ...
- selenium+python自动化98--文件下载弹窗处理(PyKeyboard)
前言 在web自动化下载操作时,有时候会弹出下载框,这种下载框不属于web的页面,是没办法去定位的(有些同学一说到点击,脑袋里面就是定位!定位!定位!) 有时候我们并不是非要去定位到这个按钮再去点击, ...
- 类unix系统同步目录,却不同步目录中文件
rsync -av --del -f '+ */' -f '- *' src/ dst/;用此条命令即可同步同主机间不同目录到一个位置,或是同步道不同主机同位置. 或是用以下命令: ssh 10.18 ...
- 命令查询职责分离(CQRS)模式
参考: http://www.cnblogs.com/yangecnu/p/Introduction-CQRS.html
- net 编译报错:编辑器或项目正在尝试签出在内存中修改的文件,这将导致保存该文件
1,报错提示: 编辑器或项目正在尝试签出在内存中修改的文件,这将导致保存该文件. 在生成过程中保存文件是危险的,这可能会在将来导致不正确的生成输出. 是否仍然继续签出? 2,原因:licenses.l ...
- Spring MVC 异常处理 - ExceptionHandler
通过HandlerExceptionResolver 处理程序异常,包括Handler映射, 数据绑定, 以及目标方法执行时的发生的异常 实现类如下 /** * 1. 在 @ExceptionHand ...
- ABAP-年月期间搜索帮助
selection-screen begin of block block1 with frame title text-. parameters:p_mon1 like s031-spmon, p_ ...
- vue - process.env 定义
1.官方解释:process 对象是一个 global (全局变量),提供有关信息,控制当前 Node.js 进程.作为一个对象,它对于 Node.js 应用程序始终是可用的,故无需使用 requir ...