在笔记本上配置python及pytorch环境

1. 在python官网上下载python的安装包(建议V3.7)

2. 双击安装.exe 

3. win+R --> cmd --> python 查看python是否安装成功

4. pip install torch 安装torch包,但是一直报错,所以从官网上下载到本地,从本地安装

https://download.pytorch.org/whl/cpu/torch_stable.html 

<另附PyTorch官网:https://pytorch.org/ 根据自己的版本需求选择torch版本>

5. pip install <把.whl文件拖到此处>   安装成功后,依然不能import torch

6. pip install torchvision==0.2.1  完成!!!

 

在pycharm里选择本地的project interpreter,即可开心的撸码啦!!!

在笔记本上配置python及pytorch环境_第1张图片

你可能感兴趣的:(环境配置)