anaconda清华镜像源安装
时间: 2023-08-23 11:15:28 浏览: 250
在Anaconda3下使用清华镜像源安装TensorFlow(CPU版)
要使用清华镜像源安装Anaconda,你需要进行以下步骤:
1. 打开Anaconda安装包位置下的`anaconda_navigator\api\conda_api.py`文件,可以在`anaconda3\Lib\site-packages`目录下找到该文件。在第1364行,将`data = yaml.load(f)`改为`data = yaml.safeload(f)`。这样可以确保在加载配置文件时不会执行任意代码,提高安全性。\[1\]
2. 找到用户目录下的`.condarc`文件,可以使用记事本打开。请注意,该文件通常是隐藏的,你需要先显示隐藏的项目。在文件中,将内容修改为以下内容:
```
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
```
这样修改后,Anaconda将使用清华镜像源进行安装和更新。\[2\]\[3\]
请确保在修改配置文件时备份原始文件,以防止意外情况发生。
#### 引用[.reference_title]
- *1* [Anaconda的安装以及使用清华源镜像安装pytorch](https://blog.csdn.net/aurora_0_0_7/article/details/120679312)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [anaconda清华镜像源使用](https://blog.csdn.net/weixin_46288319/article/details/124427980)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Anaconda清华镜像--安装、配置与使用](https://blog.csdn.net/jialong_chen/article/details/121485308)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文