zoukankan      html  css  js  c++  java
  • pip 安装six 报错 ModuleNotFoundError: No module named 'pip._internal.cli.main'

    pip 安装six 报错 ModuleNotFoundError: No module named 'pip._internal.cli.main'

    1、对 pip 进行升级

    python -m pip install --upgrade pip

    发现报错

    Collecting pip
      Downloading https://files.pythonhosted.org/packages/54/2e/df11ea7e23e7e761d484ed3740285a34e38548cf2bad2bed3dd5768ec8b9/pip-20.1-py2.py3-none-any.whl (1.5MB)
         |████████████████████████████████| 1.5MB 595kB/s
    Installing collected packages: pip
      Found existing installation: pip 19.3.1
        Uninstalling pip-19.3.1:
          Successfully uninstalled pip-19.3.1
      Rolling back uninstall of pip
      Moving to d:program filespython3.6libsite-packagespip-19.3.1-py3.6.egg
       from d:program filespython3.6libsite-packages~ip-19.3.1-py3.6.egg
      Moving to d:program filespython3.6scriptspip.exe
       from C:UsersPublicDocumentsiSkysoftCreatorTemppip-uninstall-39tpl7uwpip.exe
      Moving to d:program filespython3.6scriptspip3.6-script.py
       from C:UsersPublicDocumentsiSkysoftCreatorTemppip-uninstall-39tpl7uwpip3.6-script.py
      Moving to d:program filespython3.6scriptspip3.6.exe
       from C:UsersPublicDocumentsiSkysoftCreatorTemppip-uninstall-39tpl7uwpip3.6.exe
      Moving to d:program filespython3.6scriptspip3.exe
       from C:UsersPublicDocumentsiSkysoftCreatorTemppip-uninstall-39tpl7uwpip3.exe
    ERROR: Exception:
    Traceback (most recent call last):
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_internalcliase_command.py", line 153, in _main
        status = self.run(options, args)
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_internalcommandsinstall.py", line 455, in run
        use_user_site=options.use_user_site,
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_internal
    eq\__init__.py", line 62, in install_given_reqs
        **kwargs
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_internal
    eq
    eq_install.py", line 861, in install
        use_user_site=use_user_site, pycompile=pycompile,
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_internal
    eq
    eq_install.py", line 495, in move_wheel_files
        warn_script_location=warn_script_location,
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_internalwheel.py", line 594, in move_wheel_files
        generated_console_scripts = maker.make_multiple(scripts_to_generate)
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_vendordistlibscripts.py", line 402, in make_multiple
        filenames.extend(self.make(specification, options))
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_internalwheel.py", line 330, in make
        return super(PipScriptMaker, self).make(specification, options)
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_vendordistlibscripts.py", line 391, in make
        self._make_script(entry, filenames, options=options)
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_vendordistlibscripts.py", line 295, in _make_script
        self._write_script(scriptnames, shebang, script, filenames, ext)
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_vendordistlibscripts.py", line 231, in _write_script
        launcher = self._get_launcher('t')
      File "D:Program FilesPython3.6libsite-packagespip-19.3.1-py3.6.eggpip\_vendordistlibscripts.py", line 370, in _get_launcher
        result = finder(distlib_package).find(name).bytes
    AttributeError: 'NoneType' object has no attribute 'bytes'

    接着对pip 进行强制升级

    python -m pip install -U --force-reinstall pip
    
    
    Collecting pip
      Using cached pip-20.1-py2.py3-none-any.whl (1.5 MB)
    Installing collected packages: pip
      Attempting uninstall: pip
        Found existing installation: pip 20.1
        Uninstalling pip-20.1:
          Successfully uninstalled pip-20.1
    Successfully installed pip-20.1

    到这里终于对 pip 升级的问题解决

    接下来看刚开始的问题是否解决

    pip install six
    Requirement already satisfied: six in d:program filespython3.6libsite-packages (1.12.0)
    Could not build wheels for six, since package 'wheel' is not installed.

    看执行解决似乎已经解决,但是新的问题又出现了 说wheel 没有被安装,接下来安装wheel

    pip install wheel
    Collecting wheel
      Downloading wheel-0.34.2-py2.py3-none-any.whl (26 kB)
    Installing collected packages: wheel
    Successfully installed wheel-0.34.2

    安装成功,至此问题解决

  • 相关阅读:
    jmeter根据负载量计算并发用户数实例
    学生指导——德育
    命令行模式(非GUI模式)下执行jmeter,生成HTML性能测试报告,自定义线程数;
    jmeter 测试某系统5分钟内能完成5000笔查询业务,且90%的响应时间不超过3s,并求出需要设置的线程数
    jmeter 测试某网页最大并发用户数;
    ZOJ 3213
    POJ 2411 插头DP
    滑雪(ski)
    Puzzles
    Lorenzo Von Matterhorn
  • 原文地址:https://www.cnblogs.com/ningy1009/p/12807283.html
Copyright © 2011-2022 走看看