Conda代理错误

Zhu*_*iji 4 anaconda conda miniconda

我正在尝试在公司防火墙后面安装 conda 包/创建环境

在另一台机器上,我通过设置 HTTP/HTTPS 代理并在 conda 配置中设法从 conda 默认通道安装软件包ssl_verify: False

然而,我现在得到ProxyError: Conda cannot proceed due to an error in your proxy configuration. Check for typos and other configuration errors in any '.netrc' file in your home directory, any environment variables ending in '_PROXY', and any other system-wide proxy configuration settings.

我已经验证 conda 没有.netrc通过以下方式访问任何文件conda info

.condarc:

channels:
- defaults

# Show channel URLs when displaying what is going to be downloaded and
# in 'conda list'. The default is False.
show_channel_urls: True
allow_other_channels: True

proxy_servers:
    http: http://abc.cde.local:XXXX
    https: https://abc.cde.local:XXXX


ssl_verify: False
Run Code Online (Sandbox Code Playgroud)

以下是我尝试解决问题的步骤:

  1. 我已验证代理 URL 是否正确并且可以通过这些 URL 发出传出请求
  2. 我尝试通过conda config --set和设置这两个设置.condarc
  3. 我尝试通过环境变量设置代理

我无法更改 Windows 代理设置或执行任何需要任何管理员权限的操作。

有人对这个有经验么?

Ste*_*ott 5

如果您知道您的 condarc 文件是正确的,则在 Windows 上您需要确保您的环境变量为小写的“http_proxy”和 https_proxy”。

此外,大多数代理使用未加密的代理流量。因此请确保您的代理 URL 均为 http://

最后,当您在 Windows 中更改环境变量时,您必须启动新的 powershell 会话才能使更改生效。

这个和正确的 conda RC 文件为我解决了这个问题。