问题描述
在ubuntu系统中使用如下命令安装pip:
sudo apt install python3-pip
安装过程中出现如下报错:
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.4.0-153.170_amd64.deb 404 Not Found [IP: xx.xx.xx.xx]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip-whl_20.0.2-5ubuntu1.9_all.deb 404 Not Found [IP: xx.xx.xx.xx]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/p/python-pip/python3-pip_20.0.2-5ubuntu1.9_all.deb 404 Not Found [IP: xx.xx.xx.xx]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
解决方案
执行如下命令更新系统软件包信息:
sudo apt-get update
上述命令执行完之后,再执行pip安装命令,没有报错,正常执行完成。
安装验证
使用如下命令验证pip命令是否安装成功:
pip3 --version
若能够正常输出pip命令版本,则说明安装成功。