李沐动手学深度学习环境配置(Win)

发布时间 2023-03-22 21:13:46作者: MhjGreat

环境配置(Win)

一、安装Miniconda
https://docs.conda.io/en/latest/miniconda.html
image.png

image.png



更改镜像源
conda
notepad .condarc
image.png

pypi
pip config set global.index-url https://mirror.sjtu.edu.cn/pypi/web/simple

二、安装Git
https://ghproxy.com/
https://github.com/git-for-windows/git/releases/download/v2.40.0.windows.1/Git-2.40.0-64-bit.exe

三、下载课程Repo
https://ghproxy.com/
git clone (--depth=1) https://github.com/d2l-ai/d2l-zh.git #课程资源
git clone (--depth=1) https://github.com/d2l-ai/d2l-pytorch-slides.git #ppt

四、课程环境搭建

4.1搭建环境
conda create --name d2l python=3.9
y

激活创建的d2l Conda环境
conda activate d2l
退出环境
conda deactivate
删除环境
conda remove -n d2l --all

4.2安装库
pip install d2l torch torchvision rise
image.png


进入到项目文件夹,打开jupyter-notebook
conda activate d2l
cd D:\software\d2l-master
jupyter-notebook
image.png

关闭jupyter-notebook
ctrl+c