-bash: pip: command not found pip命令报错 解决方法(Centos版

报错原因:
没有安装pip,装上就好啦

解决方法(Centos版)

1、下载

默认使用3.6的版本,
wget https://bootstrap.pypa.io/get-pip.py

提示版本2.7的python只能使用2.7的,所以

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


2、安装

python get-pip.py
# 输入当前系统的python(x) 命令

注意
python命令需要对应你安装的python几

例如我装的python3

我运行

python3 get-pip.py

3、查看pip版本(如果本步骤正常,忽略4/5步)

pip -V

4、查找pip安装路径

which pip

find / -name pip

5、将pip添加到系统命令

ln -s  /usr/local/python/bin/pip /usr/bin/pip
 

猜你喜欢

转载自blog.csdn.net/yangyangye/article/details/132342434