anaconda创建环境出错HTTPS
报错信息
warnings.warn(
/home/ti-3/anaconda3/lib/python3.12/site-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host ‘repo.anaconda.com’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
/home/ti-3/anaconda3/lib/python3.12/site-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host ‘repo.anaconda.com’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
或者
because of HTTP error 403 Client Error: Forbidden for url
解决方法
环境配置问题镜像源问题
初始化 condarc
打开condarc文件
sudo gedit ~/.condarc
show_channel_urls: true
ssl_verify: falsechannels:- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/- defaults
上述方法无效的可以进行换一个源
换阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/