python 中 dist-packages 和 site-packages 的区别
来源:互联网 发布:js 双引号转单引号 编辑:程序博客网 时间:2024/05/16 01:27
site-packages 和 dist-packages 的区别
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:/usr/lib/python2.7/dist-packages
dist-packages 是 Debian特定惯例,这也存在于像是ubuntu上(ubuntu 是从 debian衍生来的)。 如果使用Debian软件管理器安装, 模块将被安装到 dist-packages
查看python库路径:
from distutils.sysconfig import get_python_libprint(get_python_lib())
Since easy_install and pip are installed from the package manager, they also use dist-packages, but they put packages here: /usr/local/lib/python2.7/dist-packages
自从 easy_install 和 pip (注: 是python的软件管理其,python有许许多多的软件) 使用,他们也使用 dist-packages,但是 路径是:/usr/local/lib/python2.7/dist-packages
根据现实场景:
sudo apt-get install 安装的package存放在 /usr/lib/python2.7/dist-packages目录中
pip 或者 easy_install安装的package存放在/usr/local/lib/python2.7/dist-packages目录
手动从源代码安装的package存放在site-packages目录中
顺带说下包管理工具
Python的包管理工具常见的有easy_install, setuptools, 还有pip, distribute可以看到distribute是setuptools的替代方案,pip是easy_install的替代方案. 而setuptools 和 easy_install 已经越来越不被维护了,所以建议大家试用他们的替代版, 而如果要说 distribute 和 pip 的区别,那么就是pip 的底层实现调用了 distribute 或者 setuptools
- python 中dist-packages和site-packages的区别
- python 中 dist-packages 和 site-packages 的区别
- python 中 dist-packages 和 site-packages 的区别
- Python 安装路径, dist-packages 和 site-packages 区别
- Python 安装路径, dist-packages 和 site-packages 区别
- python dist-packages 和 site-packages
- python安装第三方包的安装路径,dist-packages和site-packages区别
- Linux环境下Python的dist-packages目录与site-packages目录的区别
- 从Fabric谈到dist-packages、site-packages和load_entry_point
- 显示python的site-packages路径
- Python: 第三方模块(modules)的安装位置 (2014-08-24 23:19:18)转载▼ 标签: site-packages dist-packages 默认安装目录分类: Pyth
- python packages
- Problematic file: /usr/local/lib/python2.7/site-packages/easy-install.pth.dist
- 使用python代码找到Python site-packages目录位置
- paraview下lib/site-packages/paraview下所有python文件的作用
- Centos 7 删除/python/site-packages/ 没有yum的处理办法
- 确定当前Python环境中的site-packages目录位置
- packages.list和packages.xml
- java调用Matlab算法解决方案
- git学习笔记--添加远程库
- p2p网贷系统的架构设计
- Gitlab 架构---unicorn
- 【android】launcher图标自动生成、点9图片在线编辑工具
- python 中 dist-packages 和 site-packages 的区别
- erwdfs
- 解决linux无法识别4G以上内存问题一例
- Xcode Source Control showing multiple Working Copies How to delete?
- C++的4种类型转换关键字及其特点
- HTML5可互动的可视化图表js插件库
- opensuse内核编译教程
- [BZOJ2005]NOI2010能量采集|数学
- 20-30岁,我拿十年做什么!