1. 安装pip
sudo apt install python-pip
2. 检查pip 版本
pip --version
发现pip版本是18.x的,过于旧,所以继续更新pip
3. 下载pip源码
https://pypi.org/project/pip/#files
4. 解压后进入目录,并开始build和安装
cd pip-20.3.1
sudo python setup.py build
sudo python setup.py install
5. 发现没有pip3,继续安装pip3
sudo python3 setup.py build 此时提示
Traceback (most recent call last):
File "setup.py", line 8, in
from setuptools import find_packages, setup
ModuleNotFoundError: No module named 'setuptools'
6. 重新下载setuptool源码,给python3安装
https://pypi.org/project/setuptools/#files
cd setuptools-50.3.2
sudo python3 setup.py build
sudo python3 setup.py install
7. 返回头重新去安装pip3
cd pip-20.3.1
sudo python3 setup.py build
sudo python3 setup.py install
标签:v20,python,setup,sudo,deepin,build,pip,py,python3
来源: https://www.cnblogs.com/leipei2352/p/14091563.html