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

相关推荐
H Journey1 天前
python包和项目管理工具uv、conda介绍
python·conda·uv
hyunbar4 天前
卸载 conda(太大) 安装 miniconda
conda
索西引擎4 天前
【LangChain 1.0】环境搭建指南:从 conda 到 uv 的现代化 Python 工程实践
python·langchain·conda
charlee444 天前
《GIS基础原理与技术实践》配套案例(Python版)
python·conda·numpy·gis·环境配置
Will_Ye5 天前
Ubuntu中pip 缓存和conda的缓存路径修改
缓存·conda·pip
一只积极向上的小咸鱼5 天前
Conda 环境迁移说明
conda
fengchengwu20125 天前
Conda 虚拟环境操作手册:从入门到精通
python·conda
威尔逊·柏斯科·希伯理5 天前
机器学习第一天(共12天)
人工智能·python·机器学习·conda·numpy·pandas·matplotlib
有态度的时光5 天前
Vscode/cursor编辑器无法识别conda命令或者切换找不到包
vscode·编辑器·conda·找不到包