解决ModuleNotFoundError: No module named 'pip'问题

使用pip安装模块提示错误信息:

No module named pip

windows 解决方法:

python -m ensurepip
python -m pip install --upgrade pip
C:\Users\Administrator> python -m ensurepip
Looking in links: c:\Users\ADMINI~1\AppData\Local\Temp\tmp_tjlrd20
Requirement already satisfied: setuptools in e:\python\lib\site-packages (41.2.0)
Collecting pip
Installing collected packages: pip
Successfully installed pip-19.2.3

升级pip

C:\Users\Administrator> python -m pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
Successfully installed pip-21.3.1

linux解决方法:

python -m ensurepip
sudo easy_install pip
posted @ 2021-11-25 14:22  pure3417  阅读(164)  评论(0编辑  收藏  举报