学习记录:Windows系统cuda11.6,安装pytorch1.12.0、python3.9

1、查看显卡相关信息:nvidia-smi。显卡版本531.18,最大可以安装cuda12.1版本,安装步骤上一篇博客讲解过。

2、查看cuda版本:nvcc -V

3、查看anaconda是否安装:conda -V

4、查询cuda11.6对应的pytorch版本:https://pytorch.org/get-started/previous-versions/

显示对应的pytorch1.12.0、1.12.1,接着查询适合的python版本3.7、3.8、3.9、3.10

5、创建环境,安装pytorch1.12.0 、python3.9

conda create -n learn python==3.9
conda activate learn
# CUDA 11.6
pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116

在安装numpy处出现raise ReadTimeoutError(self._pool, None, “Read timed out.”)

先单独安装numpy:pip3 install numpy==1.22.4 scipy matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple

再次运行:pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 –extra-index-url https://download.pytorch.org/whl/cu116

 安装成功!!!

6、测试pytorch是否安装成功,安装成功

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
xiaoxingxing的头像xiaoxingxing管理团队
上一篇 2023年5月11日
下一篇 2023年5月11日

相关推荐