linux centos 下安装pip 命令

pip是一个安装和管理 Python 包的工具,用它可以下载python 的一些库

1.首先下载并安装setuptools

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

sudo python ez_setup.py --insecure

2.下载pip

wget https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9

tar -zxxf pip-9.0.1.tar.gz

3.进入pip目录

 cd pip-9.0.1

 python setup.py install

显示下面便是安装成功

Installed /usr/lib/python2.6/site-packages/pip-9.0.1-py2.6.egg
Processing dependencies for pip==9.0.1

Finished processing dependencies for pip==9.0.1


mgnix 遇到的问题并解决

[root@slave02 ~]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
-bash: /usr/local/nginx/sbin/nginx: No such file or directory
[root@slave02 ~]# cd /usr
[root@slave02 usr]# cd local/
[root@slave02 local]# ls
bin  etc  games  include  lib  lib64  libexec  sbin  share  src  webserver
[root@slave02 local]# cd webserver/
[root@slave02 webserver]# ls
nginx
[root@slave02 webserver]# cd nginx/
[root@slave02 nginx]# ls
client_body_temp  conf  fastcgi_temp  html  logs  proxy_temp  sbin  scgi_temp  uwsgi_temp
[root@slave02 nginx]# cd sbin/
[root@slave02 sbin]# ls
nginx
[root@slave02 sbin]# ./nginx -s reload
nginx: [error] open() "/usr/local/webserver/nginx/logs/nginx.pid" failed (2: No such file or directory)
[root@slave02 sbin]# cd ..
[root@slave02 nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
-bash: /usr/local/nginx/sbin/nginx: No such file or directory
[root@slave02 nginx]# /usr/local/webserver/nginx/sbin/nginx -c /usr/local/webserver/nginx/conf/nginx.conf
[root@slave02 nginx]# cd logs/
[root@slave02 logs]# ll
total 8
-rw-r--r--. 1 root root   0 Mar 23 17:16 access.log
-rw-r--r--. 1 root root 622 Mar 23 17:22 error.log
-rw-r--r--. 1 root root   6 Mar 23 17:22 nginx.pid

[root@slave02 logs]# 

pip 命令不可用的情况下

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

3,选择第二个,

4,下载后,解压缩一下

tar -zvxf pip-9.0.3.tar.gz

5,进入解压的文件,安装

cd pip-9.0.3

sudo python setup.py install

6,查看版本

pip --version



你可能感兴趣的:(linux centos 下安装pip 命令)