使用pip3安装包时报错:Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-b455doba/

使用pip3 install XX 包的时候遇到报错:

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-b455doba/numpy/
You are using pip version 8.1.1, however version 22.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

如图所示:

使用pip3安装包时报错:Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-b455doba/_第1张图片

 解决方法:

在终端输入下列命令升级pip3:

sudo pip3 install --upgrade pip

升级成功截图:

再次执行pip3 install XX命令的时候报错:

不用担心,按照下面两步就解决了:

先安装curl:

sudo apt install curl

再执行下面命令降级pip3版本:

curl -fsSL -o- https://bootstrap.pypa.io/pip/3.5/get-pip.py | python3.5

然后再执行pip3 install XX命令就不会报错了!

困扰我很长时间的问题终于解决了,希望帮助到更多的人!

你可能感兴趣的:(python,pip)