Ubuntu中“The program 'pip' is currently not installed. You can install it by typing:”

在Ubuntu中,因为python2 和python3共同存在,因此,想默认把python和pip设置为python3的版本,结果不知道怎么设置的,出现了这个报错:"

ModuleNotFoundError: No module named 'pip._internal'"

这个报错实在不知道怎么回事,于是把所有之前改过的名字都恢复了,紧接着就是这个报错了

“The program 'pip' is currently not installed. You can install it by typing:”

而且在安装mysql的过程中,出现了报错

”Errors were encountered while processing:  python3-pip  python3-setuptools  python3-wheel”

于是,我执行了如下命令:

sudo apt-get purge --auto-remove python3-pip

sudo apt-get update

sudo apt-get -y install python3-pip

于是成功安装了pip3,我在/usr/bin/下把pip3改成了pip,/usr/local/bin下的pip3也改成了pip

于是运行pip的时候就能成功运行pip3了

你可能感兴趣的:(Ubuntu中“The program 'pip' is currently not installed. You can install it by typing:”)