下载好了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是官网的,需要科学上网,我们需要配置镜像来访问

相关推荐
一颗星星辰2 分钟前
Python | 第九章 | 排序和查找
服务器·网络·python
打码人的日常分享3 分钟前
企业人力资源管理,人事档案管理,绩效考核,五险一金,招聘培训,薪酬管理一体化管理系统(源码)
java·数据库·python·需求分析·规格说明书
27669582923 分钟前
京东e卡滑块 分析
java·javascript·python·node.js·go·滑块·京东
unix2linux4 分钟前
Parade Series - SHA256
linux·python·mysql·shell
巽星石32 分钟前
【Blender Python】7.一些运算、三角函数以及随机
python·blender·三角函数·随机·环形阵列
CSXB9933 分钟前
一、Python(介绍、环境搭建)
开发语言·python·测试工具·集成测试
Mopes__36 分钟前
Python | Leetcode Python题解之第461题汉明距离
python·leetcode·题解
EterNity_TiMe_1 小时前
【机器学习】智驭未来:探索机器学习在食品生产中的革新之路
人工智能·python·机器学习·性能优化·学习方法
Mopes__2 小时前
Python | Leetcode Python题解之第452题用最少数量的箭引爆气球
python·leetcode·题解
AI视觉网奇2 小时前
pymeshlab 学习笔记
开发语言·python