-bash: pip: command not found

使用pip安装软件包时报错命令不存在

[root@test ~]# pip -V
-bash: pip: command not found

 

机器上没有安装pip,需要手动进行安装

centos系统:

#python3.7版本
wget https://bootstrap.pypa.io/get-pip.py

#python2.7版本
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py

#安装
python2.7 get-pip.py

再查看pip版本

[root@test ~]# pip -V
pip 20.3.4 from /usr/lib/python2.7/site-packages/pip (python 2.7)

若还是没有的话,搜寻pip安装路径,添加到系统命令

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

 

posted @ 2023-02-14 10:19  心恩惠动  阅读(3007)  评论(0编辑  收藏  举报