conda配置代理 和pip代理

最近清华源也经常不稳,还是使用代理,配合官网源最好用。

conda源

只需要在.condarc这个文件配置就行了:

vim ~/.condarc

这个文件中可以看到镜像源信息(如果配置了的话),在下面加上proxy就可以设置代理了:

bash 复制代码
channels:
  - defaults
show_channel_urls: true
 
proxy_servers:
  http: http://0.0.0.0:7890
  https: http://0.0.0.0:7890
ssl_verify: false

注意把http:和https:后面的链接换成你的代理链接和端口号。

pip源:

vi ~/.config/pip/pip.conf

bash 复制代码
[global]
proxy     = http://0.0.0.0:7890
相关推荐
hui函数6 小时前
如何解决 pip install 编译报错 ‘cl.exe’ not found(缺少 VS C++ 工具集)问题
开发语言·c++·pip
hui函数7 小时前
Python系列Bug修复|如何解决 pip install 安装报错 invalid command ‘bdist_wheel’(缺少 wheel)问题
python·bug·pip
hui函数7 小时前
Python系列Bug修复|如何解决 pip install -r requirements.txt 私有索引未设为 trusted-host 导致拒绝 问题
python·bug·pip
hui函数9 小时前
Python系列Bug修复|如何解决 pip install 安装报错 Backend ‘setuptools.build_meta’ 不可用 问题
python·bug·pip
hui函数10 小时前
Python系列Bug修复|如何解决 pip install -r requirements.txt 私有仓库认证失败 401 Unauthorized 问题
python·bug·pip
hui函数10 小时前
Python系列Bug修复|如何解决 pip install -r requirements.txt 子目录可编辑安装缺少 pyproject.toml 问题
python·bug·pip
hui函数1 天前
如何解决 pip install 编译报错 g++: command not found(缺少 C++ 编译器)问题
开发语言·c++·pip
hui函数1 天前
Python系列Bug修复|如何解决 pip install -e . 安装报错 “后端不支持可编辑安装(PEP 660)” 问题
python·bug·pip
hui函数1 天前
如何解决 pip install 网络报错 403 Forbidden(访问被阻止)问题
网络·pip
一尘之中1 天前
在Ubuntu 22.04中高效使用pip:从入门到精通
ubuntu·pip·ai写作