Windows系统(pip Nomodule报错)

Windows系统(pip Nomodule报错)

Traceback (most recent call last):
  File "d:\python\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\python\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\PYthon\Scripts\pip3.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'

解决办法

  • 打开CMD,执行命令获取python的安装路径(你自己知道的话可省略该步)
    • C:\Users\Administrator>where python
      D:\PYthon\python.exe
  • (以我的路径为例)执行下两个命令,不出意外出现很长一段
    • C:\Users\Administrator>cd /d D:/PYthon/Scripts
    • D:\PYthon\Scripts>easy_install.exe pip
Searching for pip
Reading https://pypi.org/simple/pip/
Downloading https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl#sha256=fab098c8a1758295dd9f57413c199f23571e8fde6cc39c22c78c961b4ac6286d
Best match: pip 20.3.3
Processing pip-20.3.3-py2.py3-none-any.whl
Installing pip-20.3.3-py2.py3-none-any.whl to d:\python\lib\site-packages
Adding pip 20.3.3 to easy-install.pth file
Installing pip-script.py script to d:\python\Scripts
Installing pip.exe script to d:\python\Scripts
Installing pip3-script.py script to d:\python\Scripts
Installing pip3.exe script to d:\python\Scripts
Installing pip3.8-script.py script to d:\python\Scripts
Installing pip3.8.exe script to d:\python\Scripts

Installed d:\python\lib\site-packages\pip-20.3.3-py3.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
  • 打完收工,查看pip版本
    • pip -V
      pip 20.3.3 from d:\python\lib\site-packages\pip-20.3.3-py3.7.egg\pip (python 3.7)
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值