python管理工具easy_install与pip
2014-10-31 14:00
501 查看
刚开始同步系统的接触python和linux,在昊妹妹的指引下学习了使用python管理工具,希望能够通过不断熟练来学习
~/ 表示home目录
文件夹or文件前加 . 表示隐藏文件夹or文件,ls命令无法查看隐藏文件,需要带参数-a
pip was originally written to improve on easy_install in the following ways
All packages are downloaded before installation. Partially-completed installation doesn’t occur as a result.
Care is taken to present useful output on the console.
The reasons for actions are kept track of. For instance, if a package is being installed, pip keeps track of why that package was required.
Error messages should be useful.
The code is relatively concise and cohesive, making it easier to use programmatically.
Packages don’t have to be installed as egg archives, they can be installed flat (while keeping the egg metadata).
Native support for other version control systems (Git, Mercurial and Bazaar)
Uninstallation of packages.
Simple to define fixed sets of requirements and reliably reproduce a set of packages.
安装好了pip则可以使用了,但是默认的pypi源在国内速度太慢,可以导入清华的pypi源,或者v2ex的源。然后修改or添加配置文件: ~/.pip/pip.conf
把内容变为:
然后pip的常用命令
virtualenv的安装很简单,直接使用pip安装即可:
进入目录,并建立虚拟环境:
激活虚拟环境:
好了,已经进入了pythonenv的虚拟环境了,应该还会有(pythonenv)的标识。
之前研究了在linux下安装python包,最近要用到matplotlib画图,在服务器上死活不出结果,结果被龙哥告知服务器上当然用不了图形界面呀,果断又在windows上使用了python。
先是安装python,添加环境变量。
接着安装easy_install,这个可以在
1.记录之前先复习以下linux下常用目录
./ 表示当前目录~/ 表示home目录
文件夹or文件前加 . 表示隐藏文件夹or文件,ls命令无法查看隐藏文件,需要带参数-a
2.python管理包
python管理工具比较常见的有esay_install和pip,pip好像普遍认为好一点,所以我们用pip,网上找到一段比较两者的pip was originally written to improve on easy_install in the following ways
All packages are downloaded before installation. Partially-completed installation doesn’t occur as a result.
Care is taken to present useful output on the console.
The reasons for actions are kept track of. For instance, if a package is being installed, pip keeps track of why that package was required.
Error messages should be useful.
The code is relatively concise and cohesive, making it easier to use programmatically.
Packages don’t have to be installed as egg archives, they can be installed flat (while keeping the egg metadata).
Native support for other version control systems (Git, Mercurial and Bazaar)
Uninstallation of packages.
Simple to define fixed sets of requirements and reliably reproduce a set of packages.
sudo apt-get install python-pip
安装好了pip则可以使用了,但是默认的pypi源在国内速度太慢,可以导入清华的pypi源,或者v2ex的源。然后修改or添加配置文件: ~/.pip/pip.conf
把内容变为:
[global] index-url = http://pypi.v2ex.com/simple/ timeout = 6000
然后pip的常用命令
pip help pip install [name] pip install '[name[==version]]' pip install -U [name] pip uninstall [name] pip freeze pip search [keyword] pip show [name]
3. 建立python虚拟环境
virtualenv可以用于提供纯净的python环境,相互独立、没有依赖关系,这可以解决库的版本、依赖和权限的问题。需要删除应用时可以直接将该环境和应用的文件夹删除即可。virtualenv可以理解为python环境的虚拟机。详细介绍请猛戳这儿virtualenv的安装很简单,直接使用pip安装即可:
pip install virtualenv
进入目录,并建立虚拟环境:
cd pythonenv virtualenv pythonenv
激活虚拟环境:
cd pythonenv source bin/activate cd ..
好了,已经进入了pythonenv的虚拟环境了,应该还会有(pythonenv)的标识。
4.从github上下载python开源包
windows之前研究了在linux下安装python包,最近要用到matplotlib画图,在服务器上死活不出结果,结果被龙哥告知服务器上当然用不了图形界面呀,果断又在windows上使用了python。
先是安装python,添加环境变量。
接着安装easy_install,这个可以在
http://pypi.python.org/pypi/setuptools 中下载,再直接运行ez_setup.py 或python ez_setup.py。这篇文章写的不错Windows 下 Python easy_install 的安装
相关文章推荐
- Python的包管理工具easy_install, setuptools, pip,distribute介绍
- Python的包管理工具easy_install, setuptools, pip,distribute介绍
- 一张图说明python包管理工具:distribute、pip、 easy_install 之间关系
- Python的包管理工具easy_install, setuptools, pip,distribute介绍
- Python的包管理工具easy_install, setuptools, pip,distribute介绍
- python中包管理工具(easy_install和pip的用法)
- Python的包管理工具easy_install, setuptools, pip,distribute介绍
- [python]python的包管理工具:pip和easy_install
- Python 的包管理工具 distribute, setuptools, easy_install 与 pip
- Python的包管理工具easy_install, setuptools, pip,distribute介绍
- Python包管理工具easy_install安装
- linux python工具pip和 easy_install的安装
- 安装python工具 easy_install pip
- Python包管理工具easy_install安装
- Python: easy_install & pip 下载PyPi 公共资源库的工具
- 安装Python 包自动安装工具 easy_install 和pip
- Centos 6.5 python 2.6.6 升级到 2.7.3,并安装easy_install和pip工具过程
- Python包管理:pip、easy_install、eggs和wheel
- Python工具easy_install 和 pip的安装
- Python包管理:pip、easy_install、eggs和wheel