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

相关推荐
Echo_NGC22374 小时前
【论文解读】Attention Is All You Need —— AI 时代的“开山之作“,经典中的经典(transformer小白导读)
人工智能·python·深度学习·神经网络·机器学习·conda·transformer
何中应5 小时前
Conda安装&使用
python·conda·python3.11
qq_229058011 天前
conda中安装 rdkit版本的postgresql然后在Win11中使用虚拟环境里的rdkit
数据库·postgresql·conda
独隅4 天前
Anaconda被误删后抢救手册
conda
矢志航天的阿洪4 天前
手动安装Gurobi并配置gurobipy到Python环境(Windows/Conda)
windows·python·conda
GL_Rain5 天前
conda通过environment.yml创建虚拟环境(指定路径)报错解决教程
conda
雕刻刀8 天前
linux中复制conda环境
linux·python·conda
乐园游梦记8 天前
在pycharm中添加Conda创建的openmmlab虚拟环境作为解释器
ide·pycharm·conda
贵沫末9 天前
Python——图像处理项目Conda环境搭建
开发语言·python·conda
佳xuan9 天前
wsl(linux)安装miniconda及虚拟环境
linux·人工智能·conda