解决python版本升级后 “No module named pip”

python 升级后导致不能使用原来的pip命令

from pip._internal import main
ModuleNotFoundError: No module named 'pip'

可使用 python -m ensurepip

Looking in links: /tmp/tmp0ec7vrb0
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-19.2.3 setuptools-41.2.0

即可成功恢复pip

参考资料
解决python “No module named pip”

添加新评论