Python中安装pip的方法
来源:互联网 发布:mac怎么隐藏桌面图标 编辑:程序博客网 时间:2024/06/06 01:19
【Preface】
Python有两个著名的包管理工具easy_install.py和pip。在Python2.7的安装包中,easy_install.py是默认安装的,而pip需要我们手动安装。
pip可以运行在Unix/Linux, OS X, and Windows平台上,支持CPython versions 2.6, 2.7, 3.1, 3.2, 3.3, 3.4 and also pypy.
【Download】
下载pip的安装包get-pip.py,下载地址:https://pip.pypa.io/en/latest/installing.html#id7
【Install pip on Windows】
从pip v1.5.1开始,安装变得很简单,直接以管理员身份,在get-pip.py所在的目录下运行
执行完成后,在python的安装目录下的Scripts子目录下,可以看到pip.exe、pip2.7.exe、pip2.exe等,这就表示pip安装成功了。
注意:要想能在命令行上直接运行pip程序,需要scripts这个目录加入到环境变量PATH中。
pip安装的时候还可以使用安装选项进行安装,比如指定get-pip.py所在的位置:
【Install pip on Linux】
在linux,使用对应Linux发行版上的包管理工具,可以很方便的进行安装。例如:
On Debian and Ubuntu:
On Fedora:
【Upgrade pip】
On Linux or OS X:
On Windows :
【Usage】
Install a package from PyPI:
安装特定版本的package,通过使用==, >=, <=, >, <来指定一个版本号。
pip install 'Markdown<2.0'
pip install 'Markdown>2.0,<2.0.3
如果有requirement的话,直接pip install -r requirements.txt就可以安装所有的了。
Uninstall a package:
Upgrade a package:
Show what files were installed:
List what packages are outdated:
【Practice】
install selenium on windows 7:
验证,打开始--所有程序--Python 2.7 ---IDLE (Python GUI),输入以下代码,并执行如果不报错,就表示selenium安装成功了。
还有一种方法,就是执行
执行结果是列出selunium包的所有文件。
【References】
https://pypi.python.org/pypi/pip
- Python中安装pip的方法
- python中pip的安装
- Python中pip的安装
- python pip安装方法
- python pip安装模块加速的方法
- python中pip的使用和安装
- python中pip和easy_install的安装
- python中pip的安装与使用
- python中pip和setuptools的安装
- python pip的安装
- pip的安装方法
- CentOS 6.4安装pip,CentOS安装python包管理安装工具pip的方法
- CentOS 6.4安装pip,CentOS安装python包管理安装工具pip的方法
- CentOS中安装Python-PIP
- python中pip安装软件
- python的安装和pip框架中requests的安装
- 【NumPy】Windows下Python通过pip安装numPy的方法
- Python: 安装库的简单方法——pip install ...
- telnet通过smtp发送邮件
- 聊一聊Redis的数据结构
- 进程间通信
- 关于C++中的输入输出流(不断更新!!!)
- Meeting with Aliens UVA
- Python中安装pip的方法
- java开发写博客了
- 微服务设计笔记(一)
- C++&
- 【Python】Matplotlib画图(四)——折线图
- 【Lua】迭代器初学
- MySQL语句之or/and
- 20170904多个docker容器中同时搭建多套ceph集群(一)---docker网络模式的了解
- 【JS开发】电商相关自用小插件