尝试更新pip时出错

时间:2018-05-01 08:09:30

标签: python linux python-3.x pip

早上好,我将Linux Void与Openbox和SpaceFm一起使用。

我想更新pip,但卸载已安装的版本(9.0.3)失败:有解决方案吗? 我也尝试过" python3 -m pip install --upgrade pip"具有相同结果的命令。

这是终端输出。谢谢。

$ pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)

    100% |████████████████████████████████| 1.3MB 280kB/s 

Installing collected packages: pip

  Found existing installation: pip 9.0.3

    Uninstalling pip-9.0.3:

Exception:

Traceback (most recent call last):

  File "/usr/lib/python3.6/shutil.py", line 544, in move

    os.rename(src, real_dst)

OSError: [Errno 18] Collegamento tra dispositivi non valido: '/usr/lib/python3.6/site-packages/pip' -> '/tmp/pip-xsteet9f-uninstall/usr/lib/python3.6/site-packages/pip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main

    status = self.run(options, args)

  File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run

    prefix=options.prefix_path,

  File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 778, in install

    requirement.uninstall(auto_confirm=True)

  File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 754, in uninstall

    paths_to_remove.remove(auto_confirm)

  File "/usr/lib/python3.6/site-packages/pip/req/req_uninstall.py", line 115, in remove

    renames(path, new_path)

  File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 267, in renames

    shutil.move(old, new)

  File "/usr/lib/python3.6/shutil.py", line 556, in move

    rmtree(src)

  File "/usr/lib/python3.6/shutil.py", line 480, in rmtree

    _rmtree_safe_fd(fd, path, onerror)

  File "/usr/lib/python3.6/shutil.py", line 418, in _rmtree_safe_fd

    _rmtree_safe_fd(dirfd, fullname, onerror)

  File "/usr/lib/python3.6/shutil.py", line 438, in _rmtree_safe_fd

    onerror(os.unlink, fullname, sys.exc_info())

  File "/usr/lib/python3.6/shutil.py", line 436, in _rmtree_safe_fd

    os.unlink(name, dir_fd=topfd)

PermissionError: [Errno 13] Permesso negato: 'freeze.py'

You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

0 个答案:

没有答案