升级pip——报错解决“You should consider upgrading via the ‘pip install --upgrade pip‘ command.”

在使用pip安装pybullet时,会出现黄色提示表示我们的pip版本太低,需要升级

You are using pip version 8.1.1, however version 23.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

升级pip——报错解决“You should consider upgrading via the ‘pip install --upgrade pip‘ command.”_第1张图片

但是当我们按照黄色字体提示,在终端输入“pip install --upgrade pip” 时,终端还是会报错

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-RdvD44/pip/

升级pip——报错解决“You should consider upgrading via the ‘pip install --upgrade pip‘ command.”_第2张图片

 下面我们给出解决方法:

一、升级pip

在终端输入:

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

升级pip——报错解决“You should consider upgrading via the ‘pip install --upgrade pip‘ command.”_第3张图片

(下面的黄色提示不用管它)

升级pip——报错解决“You should consider upgrading via the ‘pip install --upgrade pip‘ command.”_第4张图片

 出现问题: pip -V报错“/usr/bin/pip: 没有那个文件或目录”

在终端输入

// 清除缓存
hash -r    

如何还是不行,就尝试更新一下

sudo apt-get update
sudo apt-get upgrade

 

 二、升级pip3

在终端输入:

sudo wget https://bootstrap.pypa.io/pip/3.5/get-pip.py
sudo python3 get-pip.py
pip -V

升级pip——报错解决“You should consider upgrading via the ‘pip install --upgrade pip‘ command.”_第5张图片

升级pip——报错解决“You should consider upgrading via the ‘pip install --upgrade pip‘ command.”_第6张图片 

 出现问题: pip -V和pip3 -V得到的路径都是一样的

我们在终端输入:

sudo python get-pip.py

升级pip——报错解决“You should consider upgrading via the ‘pip install --upgrade pip‘ command.”_第7张图片

 然后重新pip3 -V就可以了

 

 

 

你可能感兴趣的:(pip,ros,学习,ubuntu)