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

男娘i 2022-05-21 07:42 228阅读 0赞

在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”

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

  1. sudo apt-get purge --auto-remove python3-pip
  2. sudo apt-get update
  3. sudo apt-get -y install python3-pip

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

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

发表评论

表情:
评论列表 (有 0 条评论,228人围观)

还没有评论,来说两句吧...

相关阅读