【已解决】ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问

报错描述

在 Anaconda 中用 pip 指令安装包时报错,需要升级 pip 来解决问题。在执行pip install --upgrade pip后,报出如下错误:

ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。:‘d:\anaconda\envs\scripts\pip.exe’
Consider using the --user option or check the permissions.

【已解决】ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问_第1张图片

解决方法

  1. 输入如下修复代码:
python -m ensurepip
  1. 重新更新升级 pip:
python -m pip install --upgrade pip

【已解决】ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问_第2张图片

Over …

你可能感兴趣的:(python,开发语言)