0.前言
(废话可略过:从题主开始学python安装anaconda,已经过去三四年了,最近新换了电脑从头再来一遍,想来大家学AI大都是从此一步开始的吧,想到当初遇到了很多困难,由此记录下来。真是雄关漫道真如铁,而今迈步从头越。)
win11系统下安装Anaconda 2022.10版本。
本文字少图多,步骤大多标注在图中。
下载安装包(可执行文件)
官网网址:https://www.anaconda.com/
如果官网下载太慢,以下是 百度网盘 链接:
链接:https://pan.baidu.com/s/1zNiKsMx5F1RiCF2T1WgSUw?pwd=0czp
提取码:0czp
![win11安装Anaconda最新版本](https://img-blog.csdnimg.cn/img_convert/0bd716b441530b8820956c688db50e46.png)
其他系统版本如MacOS、Linux
![](https://aitechtogether.com/wp-content/uploads/2023/06/8667ce5c-c485-41b3-aebc-4fafe19ddc08.webp)
下载得到一个可执行文件: Anaconda3-2022.10-Windows-x86_64.exe
正式安装
2.1 双击 可执行文件,开始安装
![](https://aitechtogether.com/wp-content/uploads/2023/06/a6fcfe95-15e5-4ef1-8d69-cfbf0497e4cb.webp)
![](https://aitechtogether.com/wp-content/uploads/2023/06/aa2f111a-fbf2-4ba3-b51a-504b859d2045.webp)
![](https://aitechtogether.com/wp-content/uploads/2023/06/f8371eaf-8203-44fb-91f2-044b4ed79b8c.webp)
2.2 更改安装路径说明
默认安装在C盘(据说能省很多事),但题主习惯把软件装到D,不想更改则直接Next。
![](https://aitechtogether.com/wp-content/uploads/2023/06/42886c68-5038-45fe-9331-9c86275b7a6b.webp)
换成D盘后(题主安装到D:\Anaconda3)点Next:
![](https://aitechtogether.com/wp-content/uploads/2023/06/64970698-eca3-49de-8b1f-994816208c4f.webp)
2.3 勾选说明
只勾选第二个,点击Install
![](https://aitechtogether.com/wp-content/uploads/2023/06/5596ec09-7d0c-43fc-aef3-c85ff1f996ed.webp)
2.4 耐心等待安装,一路Next
![](https://aitechtogether.com/wp-content/uploads/2023/06/53ae3998-793b-45a4-88da-5f3b78659fe4.webp)
![](https://aitechtogether.com/wp-content/uploads/2023/06/0b536cde-97af-4a4f-a824-c94e0710eeaf.webp)
![](https://aitechtogether.com/wp-content/uploads/2023/06/f73c5878-9c52-423b-ab1b-94170566eb80.webp)
配置环境变量
此电脑(右键)——>属性——>高级系统设置——>环境变量,得到下图:
![](https://aitechtogether.com/wp-content/uploads/2023/06/807ae880-ea0b-4fb6-b13f-c2c6089d1d86.webp)
![](https://aitechtogether.com/wp-content/uploads/2023/06/dd8e5794-134b-4ee5-9a5a-7e465651c74a.webp)
逐个输入以下五条环境变量:
D:\Anaconda3(Python需要)
D:\Anaconda3\Scripts(conda自带脚本)
D:\Anaconda3\Library\mingw-w64\bin(使用C with python的时候)
D:\Anaconda3\Library\usr\bin
D:\Anaconda3\Library\bin(jupyter notebook动态库)
由于我是在D:\Anaconda3路径下安装,环境变量同上。其他路径同理操作。
以上5条环境变量参考https://zhuanlan.zhihu.com/p/75717350。
![](https://aitechtogether.com/wp-content/uploads/2023/06/b5226ac9-6377-4746-9923-97e644ccdb8b.webp)
验证安装是否成功
win+r——>输入cmd,在命令窗口中,逐个输入python和anaconda命令
如图示操作:
![](https://aitechtogether.com/wp-content/uploads/2023/06/9c3cdb2a-0a98-4b9a-af98-ae4862bd785f.webp)
添加包下载源
右下角开始菜单——>所有应用——>找到 Anaconda prompt右键以管理员身份运行,如下图:
![](https://aitechtogether.com/wp-content/uploads/2023/06/7cfb1803-b86f-426c-891f-f3fb9964852e.webp)
依次输入以下命令,添加下载源:
conda config –set show_channel_urls yes (设置为yes:在下载包的时候会显示下载源地址)
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config –show channels(显示所有下载源)
![](https://aitechtogether.com/wp-content/uploads/2023/06/eb9bb0b4-5394-4ea5-acd7-eb838a7ae03e.webp)
添加上述两条下载源,已经能满足大多数的下载需求,下面是笔者自己电脑的上的,有没有用看用来下载什么内容,读者随意添加,非必须。
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config –add channels https://mirrors.ustc.edu.cn/anaconda/cloud/pytorch/
conda config –add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config –add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config –add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config –add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config –add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config –add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
6. 参考链接
环境变量:https://zhuanlan.zhihu.com/p/75717350
添加安装源:https://blog.csdn.net/m0_52307083/article/details/123391977
有帮助请点赞收藏,有任何问题请评论留言。
转载请注明出处,谢谢。
文章出处登录后可见!