pip简单配置

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:点击下载

###报错提示

[[email protected] 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:[email protected]]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

时间: 2024-08-28 00:49:50

pip简单配置的相关文章

0123简单配置LNMP

简单配置LNMP不怕出现错误,就怕错误不知道出现在哪里?看日值tail -f /var/log/message -- 系统整个的日志tail -f /var/log/nginx/error.log -- 单个应用的日志http://www.cnblogs.com/make217/p/5836864.htmlhttp://www.cnblogs.com/xiaoit/p/3991037.html

Samba服务器的简单配置

案例说明: 公共目录        public   /abc            ro  允许任何人匿名访问, Daiqing1        smbdq1   /tmp/daiqing1   rw  不允许他人访问 Daiqing2        smbdq2   /tmp/daiqing2   rw  不允许他人访问 Samba服务器的简单配置,布布扣,bubuko.com

Linux安装MariaDB和简单配置

1.安装MariaDB 安装命令 yum -y install mariadb mariadb-server 安装完成MariaDB,首先启动MariaDB systemctl start mariadb 设置开机启动 systemctl enable mariadb 接下来进行MariaDB的相关简单配置 mysql_secure_installation 首先是设置密码,会提示先输入密码 Enter current password for root (enter for none):<–初

linux ntp安装简单配置

公司的一台服务器硬件坏了挂了,其中就有ntp服务端,写一下ntp服务端的简单配置. 1.首先安装ntp,centos 系统执行 yum install ntp 2.写入配置文件/etc/ntp.conf如下 restrict 192.168.18.153 mask 255.255.255.0 nomodify notrap restrict 192.168.18.0 mask 255.255.255.0 nomodify server time.pool.aliyun.com #server 1

gedit变身为编程利器的简单配置

本文由fcbruce个人原创整理,转载请注明出处:http://blog.csdn.net/u012965890/article/details/38472149.>_< 用了linux有半年多了(ubuntu->debian),之前敲代码都是通过IDE来编译运行,一直有转Vim的想法,可是那玩意太高端,暂时玩不过来.前两天发现gedit加上各种插件简直就是神器,这两天一直在抽空配置,试用了下,感觉很爽,哈哈哈哈哈哈哈,下面来分享下我的心得.>_< 操作系统:Debian 7

【初学菜鸟作--邮件服务的简单配置案例】

邮件服务器的配置以及使用 实验一:                    实验目的:简单搭建出邮件服务器并测试其可用性                    实验环境:DNS服务器一台,安装有Portfix的邮件服务器一台 实验步骤: 一.邮件的发送(SMTP) 1.在邮件服务器配置主机名,ip,并安装portfix并启动 [[email protected]~]# tail -2 /etc/sysconfig/network HOSTNAME=mail.tarena.com   [[email

简单配置SVN手册

简单配置svn手册 修改authz 文件,添加用户 组名=用户名 readonly= [实例名称:/] @组名 = rw @readonly = 修改password文件,设置密码 用户名 = 密码 修改svnserver.conf 配置 anon-access = none auth-access = write password-db = 实例用户密码路径 authz-db = 实例用户名路径 realm = 实例路径 启动svn服务器:svnserver  -d -r = 实例目录路径 简

saltstack安装和简单配置(一)

saltstack 安装和简单配置 在安装前,写了好多废话,都被我删除了,下面就开始搞吧. 环境: master:10.70.36.110 minion:10.70.36.103 一.安装: 现在centos下的yum源内有最新的salt-master源码包,安装的话,直接     yum -y install salt-master   #服务端         yum -y install salt-minion   #客户端 要使用yum安装,必须配置好epel源,可参考:        

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

闲置已久的空间环境配置忘得差不多了,今天得空整理,重置了磁盘重新搭建环境,首先安装MariaDB的数据库,在这里记录下安装过程,以便以后查看. 1.安装MariaDB 安装命令 yum -y install mariadb mariadb-server 安装完成MariaDB,首先启动MariaDB systemctl start mariadb 设置开机启动 systemctl enable mariadb 接下来进行MariaDB的相关简单配置 mysql_secure_installati