下载好了annaconda,但是在创建一个新的Conda虚拟环境报错

文章目录

问题描述:

ProxyError(MaxRetryError("HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/pro/win-64/repodata.json.bz2 (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001D7D7A02208>: Failed to establish a new connection: [WinError 10061] 由于目标计 算机积极拒绝,无法连接。',)))",),)

解决方案

1.生成一个配置文件

1.1cmd中输入

python 复制代码
conda config --set show_channel_urls yes

1.2查看C盘/用户/电脑用户名下是否生成.condarc文件。我的如下

1.3以记事本方式打开此文件

复制以下内容进去,保存即可(可在图片下方复制)

python 复制代码
channels:
  - defaults
show_channel_urls: true
default_channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

1.4 重新输入创建虚拟环境的命令即可成功创建(如)

python 复制代码
conda create -n env_name python=3.6 

问题总结

1.主要是annaconda是官网的,需要科学上网,我们需要配置镜像来访问

相关推荐
我的xiaodoujiao38 分钟前
API 接口自动化测试详细图文教程学习系列16--项目实战演练3
python·学习·测试工具·pytest
ID_1800790547342 分钟前
Python 实现亚马逊商品详情 API 数据准确性校验(极简可用 + JSON 参考)
java·python·json
时空系1 小时前
第10篇:继承扩展——面向对象编程进阶 python中文编程
开发语言·python·ai编程
CHANG_THE_WORLD2 小时前
python 批量终止进程exe
开发语言·python
liann1192 小时前
3.2_红队攻击框架--MITRE ATT&CK‌
python·网络协议·安全·网络安全·系统安全·信息与通信
云天AI实战派2 小时前
AI 智能体问题排查指南:ChatGPT、API 调用到 Agent 上线失灵的全流程修复手册
大数据·人工智能·python·chatgpt·aigc
我的xiaodoujiao3 小时前
API 接口自动化测试详细图文教程学习系列15--项目实战演练2
python·学习·测试工具·pytest
多思考少编码4 小时前
PAT甲级真题1001 - 1005题详细题解(C++)(个人题解)
c++·python·最短路·pat·算法竞赛
ZhengEnCi4 小时前
M5-markconv自定义CSS样式指南 📝
前端·css·python
ZhengEnCi5 小时前
M4-更新日志v0.1.3-Mermaid图表支持 📝
python