试了pip版本,本电脑不太行,好吧,敢于尝试。。。
下面conda配置好清华源后成功
1. 配置虚拟环境
已经有了tf,避免包版本冲突
conda create -n pytorh-cpu python=3.6
activate pytorch-cpu
2. 输入命令添加清华源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
3.安装0.4.1的pytorch
conda install pytorch-cpu=0.4.1
conda install torchvision-cpu
4. 测试
python
import torch
torch.__version__
本文详细介绍了如何使用conda配置虚拟环境,并通过添加清华源来成功安装指定版本的PyTorch和相关依赖,有效避免了包版本冲突,确保了环境的纯净与稳定。
5310

被折叠的 条评论
为什么被折叠?



