【问题标题】:Problems with the pip python upgrading [duplicate]pip python升级问题[重复]
【发布时间】:2018-04-19 14:10:55
【问题描述】:

我正在尝试更新 pip,我在命令行上得到了这个。 还会收到升级消息。

Exception:

Traceback (most recent call last):

  File "C:\Program Files (x86)\Python36-32\lib\shutil.py", line 544, in move
    os.rename(src, real_dst)
PermissionError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python36-32\\lib\\site-packages\\pip-9.0.1.dist-info\\description.rst' -> 'C:\\Users\\MANUEL~1\\AppData\\Local\\Temp\\pip-uw3vmwny-uninstall\\program files (x86)\\python36-32\\lib\\site-packages\\pip-9.0.1.dist-info\\description.rst'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\req\req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\req\req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\req\req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\utils\__init__.py", line 267, in renames
    shutil.move(old, new)
  File "C:\Program Files (x86)\Python36-32\lib\shutil.py", line 559, in move
    os.unlink(src)
PermissionError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python36-32\\lib\\site-packages\\pip-9.0.1.dist-info\\description.rst'

我需要做什么?? 谢谢!!

【问题讨论】:

  • 以管理员身份运行cmd
  • 关闭任何打开文件的进程 ....\description.rst ?
  • 你用什么命令来更新pip?

标签: python python-3.x cmd pip


【解决方案1】:

只需以管理员身份运行命令提示符

【讨论】:

  • 这并没有提供问题的答案。一旦你有足够的reputation,你就可以comment on any post;相反,provide answers that don't require clarification from the asker。 - From Review
  • @KiranMistry 我认为 ii 可能会提供答案。但它可以使用更多关于如何执行它的指针。照原样,这个答案有点太简洁了,Harlienesh。答案应该简短而完整,并且不需要更多的网络搜索。
  • 我认为大多数 Windows 用户已经知道如何按原样使用此答案。我希望这是一个有用的答案。
猜你喜欢
  • 2021-10-21
  • 2016-05-26
  • 2019-03-20
  • 1970-01-01
  • 2019-06-13
  • 2018-07-30
  • 2021-06-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多