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 --- ...
随机推荐
- docker容器修改时区(java应用log信息与标准容器时间有八个小时时间差)
在docker容器中运行的java应用打出的日志时间和通过date -R方式获取的容器标准时间有八个小时时间差- 因为docker容器的原生时区为0时区,为了和国内时区保持一致,需要把容器时区调为东八 ...
- python 9*9示例
# 9*9 乘法表# def nine_nine():# for i in range(1, 10):# for j in range(1, i+1):# ...
- 腾讯优图联手Science发布主题报告:计算机视觉的研发和应用
近日,腾讯优图与<科学>(Science)杂志共同发布<Seeing is believing: R&D applications of computer vision> ...
- BTree,B-Tree,B+Tree,B*Tree的数据结构
B树 即二叉搜索树: 1.所有非叶子结点至多拥有两个儿子(Left和Right): 2.所有结点存储一个关键字: 3.非叶子结点的左指针指向小于其关键字的子树,右指针指向大于其关键字的子树: 如: B ...
- [Python] Hermite 插值
# -*- coding: utf-8 -*- #Program 0.5 Hermite Interpolation import matplotlib.pyplot as plt import nu ...
- 模板方法模式( TemplateMethod)
定义一个操作中的算法的骨架,而将一些步骤延迟到子类中,模板方法使得子类可以不改变一个算法的结构即可重新定义该算法的某些特定步骤. AbstractClass 是抽象类,其实也是一个抽象模板,定义并实现 ...
- nginx, supervisor
Nginx(单进程): 反向代理, 负载均衡.图解 将配置文件 nginx.conf 的 user xx 配置好 xx用户 检查语法 $ sudo service nginx configtest 重 ...
- 命令查询职责分离(CQRS)模式
参考: http://www.cnblogs.com/yangecnu/p/Introduction-CQRS.html
- SQL 2012 分页取数据
,), data int ) select * from t1 row rows only create clustered index t1c on t1(id) declare @i int ) ...
- BDE 退出历史 迁移至FireDAC
BDE组件套TQuery\TTable\TStoreProce结束历时使命. ADO组件套也停止更新, 将来是FireDAC组件套的江湖 Migrating BDE Applications to F ...