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

相关推荐
wudl55661 天前
Conda 的使用说明
conda
喜乐boy2 天前
CV系列——Conda + PyTorch + CUDA + cuDNN + Python 环境无脑安装速查笔记[2025.12]
pytorch·python·conda·cuda·cv
祁思妙想2 天前
【python】--- 创建Conda新环境/切换环境/安装
conda
Eric.Lee20212 天前
ubuntu系统在bashrc文件中对conda进行启用设置
linux·运维·python·ubuntu·conda
啦啦右一3 天前
杂货铺 | 复现Github项目,用Conda解决旧版requirements.txt的TensorFlow冲突
github·conda·tensorflow
远瞻。4 天前
【环境配置】快速转移conda上的python环境
开发语言·python·conda
毅硕科技4 天前
毅硕HPC | 在HPC集群上优雅地使用Conda
conda·hpc·应用教程·高性能计算集群·专业服务
周杰伦_Jay4 天前
【Conda 完全指南】环境管理+包管理从入门到精通(含实操示例+表格对比)
开发语言·人工智能·微服务·架构·conda
runfarther6 天前
Windows下使用源码和Conda搭建GraphRAG指南
windows·conda·graphrag
进击切图仔7 天前
GraspNet 训练集下载、解释和整理
人工智能·pytorch·conda