No module named _internal.cli.main

pip install "pip<10" --user
想降级安装 pywin32
结果导致了如下bug

Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\pip.exe\__main__.py", line 5, in <module>
ImportError: No module named _internal.cli.main

fix:
python -m pip uninstall pip
or
python -m pip install --upgrade pip

之后,pip 可以用了,仍是20.+的version

后来确认

  1. 64bit python路径: c:/python27/;
  2. 32bit python路径: c:/python/;
    把2整个文件夹删掉,再做:
    pip install "pip<10" --user or python -m pip install "pip<10"
    就装好 pip==9.0.3版本了

可以愉快安装 dist-shell, dist-sh-srv啦

posted @ 2020-09-22 11:08  vivi~  阅读(1101)  评论(0编辑  收藏  举报