1 前言

pip 是一个Python包管理工具,主要是用于安装 PyPI 上的软件包,可以替代 easy_install 工具。

2 获取pip

2.1 脚本安装pip

下载文件:

wget https://bootstrap.pypa.io/get-pip.py

执行结果:

[root@node1 python_lib]# wget https://bootstrap.pypa.io/get-pip.py
--2017-11-10 22:43:23--  https://bootstrap.pypa.io/get-pip.py
正在解析主机 bootstrap.pypa.io... 151.101.72.175
正在连接 bootstrap.pypa.io|151.101.72.175|:443... 已连接。
错误: 证书通用名 “*.c.ssl.fastly.net” 与所要求的主机名 “bootstrap.pypa.io” 不符。
要以不安全的方式连接至 bootstrap.pypa.io,使用‘--no-check-certificate’。

下载失败,提示使用‘--no-check-certificate’

wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
......
......

下载成功了,开始安装

[root@node1 python_lib]# python get-pip.py DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting pip
/tmp/tmpmjaBRb/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
/tmp/tmpmjaBRb/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)100% |████████████████████████████████| 1.3MB 25kB/s
Collecting wheelDownloading wheel-0.30.0-py2.py3-none-any.whl (49kB)100% |████████████████████████████████| 51kB 25kB/s
Installing collected packages: pip, wheel
Successfully installed pip-9.0.1 wheel-0.30.0
/tmp/tmpmjaBRb/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.

安装成功。

[root@node1 python_lib]# python get-pip.py

DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting pip
/tmp/tmpmjaBRb/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
/tmp/tmpmjaBRb/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 25kB/s
Collecting wheel
  Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
    100% |████████████████████████████████| 51kB 25kB/s
Installing collected packages: pip, wheel
Successfully installed pip-9.0.1 wheel-0.30.0
/tmp/tmpmjaBRb/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.

2.2 检查安装结果

[root@node1 python_lib]# pip -versionUsage:   pip <command> [options]no such option: -e
[root@node1 python_lib]#

执行 pip -version 如果出现了上面的提示,证明安装成功,这里虽然看起来是是安装成功了,但是上面有一个很重要的提示:

DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
翻译之后就是:
Python核心团队不再支持Python 2.6,请升级您的Python。 未来版本的pip将会放弃对Python 2.6的支持,看来这个安装其实是不能用的,因为目前用的是python2.6.6,所以接下来是把python升级到2.7

Python2.6下安装pip相关推荐

  1. ArcGIS10.2自带的Python2.7下安装pip

    楼主比较懒,不想安装新的Python,就用ArcGIS10.2自带的Python2.7. 1 先配置Python环境 打开控制台,输入"Python",我们能够看到显示不是内部或外 ...

  2. CentOS升级Python2.7及安装pip

    CentOS升级Python2.7及安装pip<?xml version="1.0" encoding="UTF-8"?> CentOS升级Pyth ...

  3. python安装pip_在MAC下安装pip,并关联到相应的python版本

    在MAC下安装pip,并关联到相应的python版本 博客说明 文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢! 说明 不多说了,说就是电脑 ...

  4. Mac的终端下安装pip

    Mac的终端下安装pip 首先,查看python的版本 % python -V Python 2.7.18 % cd /tmp 然后,下载文件get-pip.py % curl https://boo ...

  5. 【Python 笔记】Linux下安装pip方法的全总结

    本文研究记录了 Linux 下安装 pip 的全部方法. 文章目录 1. 通过 Linux 系统的包管理工具安装 1.1 apt 包管理工具安装 pip 1.1.1 安装 1.1.2 升级 1.1.3 ...

  6. Centos 7下安装pip(简略版)

    之前写过一个centos6下安装pip,具体链接: 点击打开链接   系统:centos7  1. 安装epel扩展源: yum install epel-release 2.安装Python-pip ...

  7. python中arch模块_在Arch下安装pip

    1. 首先安装一个命令行下载工具,我这里使用axel: $ axel https://bootstrap.pypa.io/get-pip.py #下载完成之后得到一个python文件 $ ls get ...

  8. Python2.7.2 安装pip记录

    因为需要用到pyv8, 最高支持Python2.7.2, 所以下载了此版本. 因为2.7.9以后才自带pip工具, 所以需要手动安装一下. 第一次尝试: 从https://pypi.org/搜了一下p ...

  9. python seaborn安装_Windows下安装pip、matplotlib以及seaborn

    安装Matplotlib 一个有用的python包下载网址 安装python 安装pip(一个python包管理工具) 下载tar.gz包,解压,然后在命令行里进入解压目录,输入 python set ...

最新文章

  1. Python多版本pip安装库的问题
  2. 1010 Radix
  3. 手机扫一扫就能“隔空移物”?AR炫酷新玩法,快来解锁新技能吧!
  4. 【SQL Server】系统学习之三:逻辑查询处理阶段-六段式
  5. 问题总结:判断MS SQLSERVER临时表是否存在 drop table #tempcitys
  6. 图像局部显著性—线特征
  7. 【卡法电子商务】-常用手机屏幕尺寸 ★★★★★
  8. Java设计模式(4 / 23):单例模式
  9. 【乐理知识】第二章 音符 休止符
  10. paip.基于navicate mysql的自动化报表工具总结
  11. UVA1292-----Strategic game-----树形DP解决树上的最小点覆盖问题
  12. java pdf文件如何转换tiff文件_C#实现TIF图像转PDF文件的方法
  13. 100%解决GitHub打不开或者打开慢
  14. 山东春考c语言试题及答案,2020 年山东省春季高考技能考试 信息技术类专业试题...
  15. 作文组装计算机,组装电脑作文200字
  16. 计算机字号调整,解答如何调整电脑字体大小
  17. 怎么用微信公众号领取淘宝诶不优惠券购物教程
  18. Android背景虚化的PopupWindow 可指定虚化区域
  19. OpenCV每日函数 图像过滤模块 (8) GaussianBlur高斯模糊函数
  20. 中国空气质量在线监測分析平台

热门文章

  1. 什么是外观检测系统?外观检测系统的功能有哪些?
  2. 网络安全 中间人攻击-DNS欺骗 使用ettercap
  3. ubuntu16.04安装digits
  4. ModScan32使用基础
  5. 面试题-Java基础(四)-反射
  6. 电解电容使用久了电容量真的会下降吗?
  7. 如何从零开始学习人工智能
  8. 《大数据技术原理与应用》(第八章Hadoop 课后答案)
  9. 30道SQL经典笔试题及其答案解析
  10. Windows端pytorch镜像快速安装【清华源】