pychram安装torch包解决anaconda创建虚拟环境-爱代码爱编程
报错类似如下:
Pychram直接install不成功
ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch
ERROR: Could not find a version that satisfies the requirement PyQt5 (from versions: non e) ERROR: No matching distribution found for PyQt5
解决方法:
首先下载Anaconda,此处不赘述如何下载
进入anaconda promot控制台界面
这里是默认的虚拟环境,最好自己创建一个虚拟环境
conda create --name DeepLearning python=3.7
然后activate DeepLearning
进入创建的虚拟环境
下载pytorch依赖
conda install pytorch torchvision torchaudio cpuonly -c pytorch
然后在Pychram中创建新的解释器
然后使用新的解释器即可