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

相关推荐
没事儿写两篇2 天前
Anaconda 的开源替代软件 Miniforge
开源·conda·miniconda·miniforge
次旅行的库2 天前
不能将windows本地虚拟环境打包到实验室服务器
linux·windows·conda
云和数据.ChenGuang3 天前
python对接mysql和模型类的故障
数据库·python·mysql·oracle·conda·virtualenv
Clarice__4 天前
VScode上的python使用教程
vscode·python·conda
存在即合理L4 天前
Windows中安装Anaconda后如何在powershell使用conda activate命令
windows·conda
m0_647057964 天前
PyCharm 2023.2.5 Conda Interpreter 解析失败问题排查与解决(macOS)
macos·pycharm·conda
YelloooBlue4 天前
深度学习 SOP: conda通过命令快速构建指定版本tensorflow gpu环境。
深度学习·conda·tensorflow
小舞O_o5 天前
CondaError: Run ‘conda init‘ before ‘conda activate‘
linux·python·conda
Clarice__6 天前
Anaconda安装、使用教程
windows·python·机器学习·conda·visual studio code
gsgbgxp6 天前
安装库是优先用conda还是pip
深度学习·ubuntu·conda·pip