无法更新点子。或者安装点子。 windows 10 pycharm

时间:2018-06-06 07:22:30

标签: python pip pycharm

无法更新或任何带有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.3.dist-info\\description.rs
    t' -> 'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-lpjr52z1-uninstall\\program files (x86)\\python36-32\\lib\\site-packages\\pip-9.0.3.dist-inf
    o\\description.rst'

在处理上述异常期间,发生了另一个异常:

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.3.dist-info\\description.rs
t'

1 个答案:

答案 0 :(得分:0)

尝试通过可执行文件安装:

python -m pip install mitmproxy

确保将cmd作为 admin 运行。