conda 设置代理

目录

[windows conda设置代理](#windows conda设置代理)

命令行设置代理测试没成功

[.condarc配置 测试ok:](#.condarc配置 测试ok:)

查看conda配置

[Ubuntu conda设置代理](#Ubuntu conda设置代理)


windows conda设置代理

修改文件: C:\Users\..condarc

channels:

show_channel_urls: true

allow_other_channels: true

proxy_servers:

http: http://username:password@xx.xx.xx.xx:port

https: http://username:password@xx.xx.xx.xx:port

ssl_verify: true

命令行设置代理测试成功

conda config --set proxy_servers.http http://127.0.0.1:7890

conda config --set proxy_servers.https http://127.0.0.1:7890

命令行设置后再操作可以,但是改到.condarc 不起作用

.condarc配置 测试失败:

bash 复制代码
proxy_servers:
  http: 127.0.0.1:7890
  https: 127.0.0.1:7890
ssl_verify: false

查看conda配置

conda config --show

Ubuntu conda设置代理

vim ~/.condarc

这个文件中可以看到镜像源信息(如果配置了的话),在下面加上proxy就可以设置代理了:

channels:

show_channel_urls: true

proxy_servers:

http: http://xxx.xx.com:8080

https: https://xxx.xx.com:8080

ssl_verify: false

注意:

1.第一个http:和https:后面跟一个空格,ssl_verify:后面也跟一个空格

2.http:和https:后面的链接换成你的代理链接和端口号。

没有空格会报错:无效的参数, frozendict

相关推荐
woshihonghonga21 小时前
停止Conda开机自动运行方法
linux·人工智能·conda
liliangcsdn21 小时前
如何使用命令修改conda虚拟环境目录
conda
JANGHIGH2 天前
YOLO系列——Ubuntu20.04下通过conda虚拟环境安装Labelme
yolo·conda
Stestack3 天前
Linux - conda 环境安装教程
linux·conda
踏过山河,踏过海3 天前
【After Anaconda installation,conda can not run】
conda
至此流年莫相忘3 天前
配置Python环境之Conda
python·conda
cooldream20093 天前
深入解析 Conda、Anaconda 与 Miniconda:Python 环境管理的完整指南
开发语言·python·conda
NEFU AB-IN3 天前
在 Windows PowerShell(pwsh)中配置 Oh My Posh + Conda 环境美化与性能优化
windows·conda
原小明3 天前
【Conda】Conda虚拟环境配置系统环境变量,Jupter可使用
vscode·python·jupyter·conda
漂亮_大男孩4 天前
conda|如何通过命令行在mac上下载conda
macos·conda