由于没有边配置环境边记笔记,事后总结可能缺少截图
conda环境配置
1下载miniconda
下载完成后 在上海交通大学镜像网站复制文本
上海交通大学 Linux 用户组 软件源镜像服务 (sjtu.edu.cn)
复制其中文本,在命令窗口中创建文本(notepad .condarc)保存该段文本
之后用conda clean-i 清除缓存,更换镜像源
使用pip
在conda中黏贴黑窗中命令并执行
2安装git
Git - Downloading Package (git-scm.com)
点击下载
3下载课程资源以及幻灯片资源
创建目录,新建文件夹或者通过命令创建
课程资源下载命令行 git clone https://github com/d2l-ai/d2l-zh.git
幻灯片资源 git clone https://github.com/d2l-ai/d2l-pytorch-slides.git
在https://github.com/d2l-ai/d2l-zh.git与 git clone之间加入https://ghproxy.com
4课程环境配置
在命令行中输入
conda create --name python=3.9//设置pthon版本
使用conda activate d2l(文件夹名)进入配置的环境
使用conda dactivate 回到base环境
删除环境 conda remove d2l --name --all
确保环境在d2l中使用下面命令
利用pip intsall d2l torch torchvision rise
在 d2l-pytorch -sliders中打开jupyter-notebook
即可打开juptyer
使用ctrl +C关闭环境完成学习