Linux报错:pip: command not found

问题描述

CentOS7下,执行pip提示不存在

# 系统
cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

# 检查python已存在
$ python -V
Python 2.7.5

# 检查pip,提示命令不存在
$ pip -V
bash: pip: command not found

解决方式

下载地址
https://bootstrap.pypa.io/pip/

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

# 安装
python get-pip.py

# 检查
pip -V
pip 20.3.4 from /usr/lib/python2.7/site-packages/pip (python 2.7)

参考
-bash: pip: command not found pip命令报错 解决方法

猜你喜欢

转载自blog.csdn.net/mouday/article/details/128492350