pip windows 升級失敗(update to 9.x)

來源:互聯網
上載者:User

打算把7.1.2 的pip升級到9.0.1 ,結果直接採用cmd推薦的python -m pip install --upgrade pip 總是報出下面的錯誤:

Installing collected packages: pip
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
  Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\basec
ommand.py", line 211, in main
    status = self.run(options, args)
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\comma
nds\install.py", line 311, in run
    root=options.root_path,
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\req\r
eq_set.py", line 646, in install
    **kwargs
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\req\r
eq_install.py", line 803, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\req\r
eq_install.py", line 998, in move_wheel_files
    isolated=self.isolated,
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\wheel
.py", line 449, in move_wheel_files
    generated.extend(maker.make(spec))
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\_vend
or\distlib\scripts.py", line 353, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\_vend
or\distlib\scripts.py", line 257, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\_vend
or\distlib\scripts.py", line 193, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\_vend
or\distlib\scripts.py", line 332, in _get_launcher
    result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'


後面去http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip查看了以下三種安裝或者更新pip的方法:

1、use the get-pip.py script or run

2、python.exe pip-9.0.1-py2.py3-none-any.whl(先下載whl,連結如下)

3、pip install pip-9.0.1-py2.py3-none-any.whl(先下載whl,連結如下)

pip‑9.0.1‑py2.py3‑none‑any.whl

親測方法1 ok, 方法2,3失敗,原因不知道為什麼~

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.