- 安装anaconda
anaconda官网下载安装包:Download Anaconda Distribution | Anaconda
安装完成之后,在命令行使用命令,conda create -n 'yourname'创建新环境
使用conda activate 'yourname'进入环境 - 安装pytorch
pytorch官网:PyTorch
在虚拟环境中,使用命令conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia 即可完成pytorch的安装,系统会自适应版本。
- 安装jupyter
在虚拟环境中使用命令 pip install jupyter,即可完成jupyter的安装。
注意,使用conda install jupyter 安装会报错。 - 安装各种包
安装tensorboard:pip install tensorboard
安装Cartopy,需要使用命令:conda install -c conda-forge cartopy