python pip包管理

pip 是一个安装和管理 Python 包的工具 , 是 easy_install 的一个替换品。本文将详细说明 安装 pip 的方法和 使用 pip 的一些基本操作如安装、更新和卸载 python 包。

distribute是setuptools的取代(Setuptools包后期不再维护了),pip是easy_install的取代。

pip的安装需要setuptools 或者 distribute,如果你使用的是Python3.x那么就只能使用distribute因为Python3.x不支持setuptools。

见下图:

#wget http://python-distribute.org/distribute_setup.py

#python distribute_setup.py

setuptools安装:

#https://pypi.python.org/packages/source/s/setuptools/

#wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz

#tar zxvf setuptools-1.4.2.tar.gz

#cd setuptools-1.4.2;python setup.py install;easy_install --version

安装Pip:

wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz

tar zxvf pip-1.4.1.tar.gz

cd pip-1.4.1

python setup.py install

测试:

pip install simplejson

下面来看一下pip的使用:

安装特定版本的package,通过使用==, >=, <=, >, <来指定一个版本号。

pip install ‘Markdown<2.0‘

pip install ‘Markdown>2.0,<2.0.3‘

升级包到当前最新的版本,可以使用-U 或者 --upgrade

pip install -U Markdown

卸载包

pip uninstall Markdown

查询包

pip search "multiprocessing"

列出安装的packages

$ pip freeze

时间: 2024-08-02 11:29:09

python pip包管理的相关文章

CentOS中Python pip包管理工具的安装和使用

Python有很多第三方的模块或包,要管理这些包,有很多方法.python的pip包管理工具,类似与CentOS中yum,使用该工具安装Python包非常方便. 从Python内部来说,pip 是一个安装和管理 Python 包的工具 , 是 easy_install 的一个替换品.distribute是setuptools的取代(Setuptools包后期不再维护了),pip是easy_install的取代. pip的安装前需要setuptools 或者 distribute,如果你使用的是P

Python的包管理工具Pip (zz )

Python的包管理工具Pip 接触了Ruby,发现它有个包管理工具RubyGem很好用,并且有很完备的文档系统http://rdoc.info 发现Python下也有同样的工具,包括easy_install和Pip.不过,我没有细看easy_install的方法,这就简单的介绍一下Pip的安装与使用: 准备: $ curl -O http://python-distribute.org/distribute_setup.py $ python distribute_setup.py 安装: $

Python之包管理工具

在Python环境中已经有很多成熟的包,可以通过安装这些包来扩展我们的程序. 例如,很多时候Python开发人员都会去PyPI网站去查找自己想要使用的包,然后进行安装.PyPI ( Python Package Index)是获得第三方 Python 软件包以补充标准库的一个站点. 在安装Python包的过程中,经常涉及到distutils.setuptools.distribute.setup.py.easy_install.easy_install和pip等等. 突然对Python的包管理凌

Python的包管理

0.Python的包管理 在刚开始学习Python的时候比较头疼各种包的管理,后来搜到一些Python的包管理工具,比如setuptools, easy_install, pip, distribute,了解到他们的大致关系如下图: Python包管理工具 总而言之,pip是一个方便安装和管理Python包的工具,是easy_install的取代,使用起来相对容易. 1.安装pip 安装pip很简单. 首先进入pip官方主页,跳转到安装介绍页面,下载get-pip.py,然后在cmd中执行: p

Python的包管理工具Pip

接触了Ruby,发现它有个包管理工具RubyGem非常好用,而且有非常完备的文档系统http://rdoc.info 发现Python下也有相同的工具,包含easy_install和Pip.只是,我没有细看easy_install的方法,这就简单的介绍一下Pip的安装与使用: 准备: $ curl -O http://python-distribute.org/distribute_setup.py $ python distribute_setup.py 安装: $ curl -O https

windows下python的包管理器pip安装

pip:  安装和管理Python的包的工具 要用到第三方包,python的版本就必须是2.7 https://pypi.python.org/pypi/setuptools#downloads python ez_setup.py https://pip.pypa.io/en/latest/installing.html#python-os-support python get-pip.py

Python的包管理工具distribute,setuptools,easy_install与pip

刚开始学习Python时,看资料和别人介绍中提到过,安装Python的包有的用easy_install, setuptools, 有的使用pip,distribute.现在把这些相关的资料整理一下,能更清晰的了解Python的设计,关于这些可以参考http://guide.python-distribute.org/installation.html. 1.distutils Python 自带的基本安装工具,适用于非常简单的应用场景. 2.distribute 通过查阅Distribute的文

Python的包管理工具--PIP安装使用

最新安装方式 # wget https://bootstrap.pypa.io/get-pip.py # python get-pip.py  // 使用该方式安装已经不再要求提前安装setuptoos了,如发现未安装会自动安装setuptoos 不同平台pip官网安装教程 https://pip.pypa.io/en/stable/installing.html#install-piphttps://pypi.python.org/pypi/pip 使用distribute_setup.py安

windows下安装python的包管理工具pip,scikit-learn

打开https://pip.pypa.io/en/latest/installing.html#python-os-support 下载pip-get.py 进入python,执行pip-get.py 安装完pip,setuptool工具. 进入.python/scripts目录,执行pip install scikit-learn