为什么Windows不允许我升级pip?

时间:2017-03-02 06:35:11

标签: python

在尝试为Discord创建Bot时,我遇到了Python的问题,因为它说我必须从版本7.1.2升级到版本9.0.1,但当我将命令全部输入时可以说我需要更新,但它只是不让我。

    C:\WINDOWS\system32>python -m pip install --upgrade pip
    Collecting pip
      Using cached pip-9.0.1-py2.py3-none-any.whl
    Installing collected packages: pip
      Found existing installation: pip 7.1.2
    Exception:
    Traceback (most recent call last):
      File "C:\Users\JoséMiguel\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\basecommand.py", line 211, in main
        status = self.run(options, args)
      File "C:\Users\JoséMiguel\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\commands\install.py", line 311, in run
        root=options.root_path,
      File "C:\Users\JoséMiguel\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\req\req_set.py", line 640, in install
        requirement.uninstall(auto_confirm=True)
      File "C:\Users\JoséMiguel\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\req\req_install.py", line 673, in uninstall
        for path in pip.wheel.uninstallation_paths(dist):
      File "C:\Users\JoséMiguel\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\wheel.py", line 512, in unique
        for item in fn(*args, **kw):
      File "C:\Users\JoséMiguel\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\wheel.py", line 531, in uninstallation_paths
        r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
      File "C:\Users\JoséMiguel\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1619, in get_metadata_lines
        return yield_lines(self.get_metadata(name))
      File "C:\Users\JoséMiguel\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1616, in get_metadata
        return self._get(self._fn(self.egg_info, name)).decode("utf-8")
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 22368: invalid continuation byte
    You are using pip version 7.1.2, however version 9.0.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.

每次运行命令时都会这样做,即使我在Admin上运行CMD。

我已经从网站上下载了最新的pip版本( pip-9.0.1-py2.py3-none-any.whl )和 get-pip.py ,但是当我运行它时它所做的一切与命令提示符相同。

我使用的是:Windows 10Python 3.5.2

0 个答案:

没有答案