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

相关推荐
SoulRoar.1 天前
WSL2 + Conda 环境下MinerU 4.x GPU 服务部署与 systemd 常驻指南
conda·wsl·文档解析·mineru
benjiangliu13 天前
恩培趣味计算机视觉-01-conda环境和Python库
开发语言·python·conda
weixin_4617694017 天前
conda create 创建容器 Failed to resolve ‘repo.anaconda.com‘问题
开发语言·python·conda·repo·网络问题·无法创建
饭来_21 天前
Ubuntu 中出现 CondaToSNonInteractiveError 的解决方法
ubuntu·conda·debug
emo_2b23 天前
Pycharm配置conda解释器时遇到的问题及解决方法
linux·pycharm·conda
Είναι η κοπέλα25 天前
llama.cpp 与 GGUF 格式:本地大模型的“裸引擎“
开发语言·人工智能·pytorch·python·conda
Είναι η κοπέλα1 个月前
显存计算与模型选择:你的显卡能跑多大的模型
人工智能·pytorch·python·开源·conda
天蓝蓝的本我1 个月前
conda日常用到的命令积累1-登录linux,安装pycharm
linux·pycharm·conda
Είναι η κοπέλα1 个月前
Python 虚拟环境:venv、conda 与 Python 版本选择全解
开发语言·python·conda
夏天拐跑了西瓜1 个月前
一文入门LangChain:从框架认知到构建你的第一个AI Agent
python·langchain·conda·agent