pip安装Python模块的工具,等价于Redhat中的yum!

01、下载

百度云盘:http://pan.baidu.com/s/1eRHGBfk             ###相关的

Linux很多都默认安装Python,python -V  #查看python版本

python

https://www.python.org/downloads/source/

Python-2.6.6.tgz   :点击下载

Python2.7.13      :点击下载

tar Jxf Python-2.7.13.tar.xz

./configure  && make && make install

setuptools

https://pypi.python.org/pypi/setuptools

###setuptools的作用:Easily download, build, install, upgrade, and uninstall Python packages

setuptools-32.3.0.zip:点击下载

###报错提示

[root@bang pip-9.0.1]# python setup.py install
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    from setuptools import setup, find_packages
ImportError: No module named setuptools

###解决方案

安装setuptools

unzip  setuptools-32.3.0.zip

cd setuptools

python setup.py install

pip

https://pypi.python.org/pypi/pip

pip-9.0.1.tar.gz:点击下载

https://pip.pypa.io/en/stable/   ###pip官方文档

tar zxf   pip-9.0.1.tar.gz

python setup.py install

02、pip用法:

# pip --help
 
Usage:   
  pip <command> [options]
 
Commands:
  install                     安装包.
  uninstall                   卸载包.
  freeze                      按着一定格式输出已安装包列表
  list                        列出已安装包.
  show                        显示包详细信息.
  search                      搜索包,类似yum里的search.
  wheel                       Build wheels from your requirements.
  zip                         不推荐. Zip individual packages.
  unzip                       不推荐. Unzip individual packages.
  bundle                      不推荐. Create pybundles.
  help                        当前帮助.
 
General Options:
  -h, --help                  显示帮助.
  -v, --verbose               更多的输出,最多可以使用3次
  -V, --version               现实版本信息然后退出.
  -q, --quiet                 最少的输出.
  --log-file <path>           覆盖的方式记录verbose错误日志,默认文件:/root/.pip/pip.log
  --log <path>                不覆盖记录verbose输出的日志.
  --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
  --timeout <sec>             连接超时时间 (默认15秒).
  --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
  --cert <path>               证书.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new
                              version of pip is available for download. Implied with --no-
                              index.
 

pip install --cacahe-dir .  shinken*.tar.gz            ###安装本地的python编写的文件

03、配置pip源

pip源,采用阿里云的pip源用于加速下载文件

阿里云:http://mirrors.aliyun.com/help/pypi

在~/.pip/pip.conf

[global] index-url = http://mirrors.aliyun.com/pypi/simple/

[install] trusted-host=mirrors.aliyun.com

04、采用yum或apt-get

yum install -y python-setuptools python-pip

apt-get install python-setuptools python-pip

pip简单配置的更多相关文章

  1. 在pycharm中配置Anaconda以及pip源配置

    在学习推荐系统.机器学习.数据挖掘时,python是非常强大的工具,也有很多很强大的模块,但是模块的安装却是一件令人头疼的事情. 现在有个工具--anaconda,他已经帮我们集成好了很多工具了!an ...

  2. Django安装与简单配置(1)

    目录 1. 环境准备 2. 开始安装 2.1 安装Django 2.2 安装 Mysql数据库 3. 开始配置 3.1 Django简单配置 3.1.1 创建一个工程(project)为devops: ...

  3. 小丁带你走进git世界一-git简单配置

    小丁带你走进git世界一-git简单配置 1.github的简单配置 配置提交代码的信息,例如是谁提交的代码之类的. git config  –global user.name BattleHeaer ...

  4. 以实际的WebGIS例子探讨Nginx的简单配置

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 以实际项目中的一个例子来详细讲解Nginx中的一般配置,其中涉 ...

  5. CentOS 7.0 使用 yum 安装 MariaDB 与 MariaDB 的简单配置

    1.安装MariaDB 安装命令 yum -y install mariadb mariadb-server 安装完成MariaDB,首先启动MariaDB,两条命令都可以 systemctl sta ...

  6. ssm简单配置

    MyBatis 是一个可以自定义SQL.存储过程和高级映射的持久层框架. MyBatis 摒除了大部分的JDBC代码.手工设置参数和结果集重获. MyBatis 只使用简单的XML 和注解来配置和映射 ...

  7. 安装MariaDB和简单配置

    1.安装MariaDB 安装命令 yum -y install mariadb mariadb-server 安装完成MariaDB,首先启动MariaDB systemctl start maria ...

  8. BIND的进程一:DNS简单配置与的主从配置

    DNS的简单配置和DNS的主从配置   摘要:DNS(Domain-Name Server) ,DNS的服务起到的作用就是名称解析,在网络通讯来说计算机与计算机是通过IP地址相互通信的, 当是IP地址 ...

  9. 转-squid介绍及其简单配置

    本文原始出处:http://linuxme.blog.51cto.com/1850814/372960 1.Squid是什么? Squid中文权威指南:http://zyan.cc/book/squi ...

随机推荐

  1. Js 日期加减天数

    <SCRIPT language="javascript"> function addDate(dd,dadd){ var a = new Date(dd) a = a ...

  2. CMMI5级——原因分析及解决方案(Causal Analysis and Resolution)

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u010825142/article/details/15338085 聪明的人在出现问题的时候,除了 ...

  3. [翻译] 带有震动效果的 ShakingAlertView

    ShakingAlertView  震动效果的AlertView https://github.com/lukestringer90/ShakingAlertView ShakingAlertView ...

  4. iOS宏(自己使用,持续更新)

    // 直接从RGB取颜色(RGB 0xFF00FF)#define UICOLOR_FROM_RGB(rgbValue) \[UIColor colorWithRed:((float)((rgbVal ...

  5. 更改Mantis的logo

    1 准备好自己的logo,例如准备的logo为zhaoxiyu.gif.zxy.gif 2 把上面的两个logo存放到C:/mantis-1.0.0a3/images 3 打开C:/mantis-1. ...

  6. JavaScript 面向对象编程之一

    一:Class and private And public JS 中的类以 function 进行声明,同时 JS 也支持声明私有 private 和公有 public 成员,只不过跟 C# 不一样 ...

  7. 文件权限控制篇access alphasort chdir chmod chown chroot closedir fchdir fchmod fchown fstat ftruncate getcwd

    access(判断是否具有存取文件的权限) 相关函数 stat,open,chmod,chown,setuid,setgid 表头文件 #include<unistd.h> 定义函数 in ...

  8. mysql必知必会(四、检索数据,五、排序检索数据,六、过滤数据,七、数据过滤)

    四.select语句 1.检索单个列 select prod_name from products; 2.检索多个列 select prod_name, prod_price from product ...

  9. Android数据展示之ListView

    Android应用程序中经常需要使用ListView展示数据,一个ListView通常将数据填充到布局文件中,在填充的过程中需要知道连接数据与ListView的适配器.适配器是一个连接数据和Adapt ...

  10. Linux上如何查看Deb和RPM软件包的更新日志

    导读 当一个程序或库打包成Deb或RPM软件包后会有一些元数据文件包含在其中,其中之一就是 changelog文件,它记录了软件包每次更新后发生了什么变化.因此,如果你想找出你安装或更新的软件包发生了 ...