Win10-GPU服务器-深度学习从零配置环境

1.装anaconda

下载安装anaconda(conda也一并装了)

https://www.anaconda.com/products/distribution

配系统变量

        将类似这个位置放进path里面“C:\ProgramData\Anaconda3”

2.安装1.5.0版本的pytorch GPU版

2.1确定的你的显卡型号

        https://jingyan.baidu.com/article/25648fc185a8a8d090fd005c.html

        我的型号是GTX 1660 Ti

2.2装NVIDIA显卡驱动

        安装指定版本的NVIDIA驱动程序:官方驱动 | NVIDIA

        我的是这个

Win10-GPU服务器-深度学习从零配置环境_第1张图片

建议选择studio驱动。玩游戏的话就安装game ready驱动,studio驱动面向的是专业用户,studio会对一些生产力软件进行优化

 2.3装cuda指定版本

查询自己目前的cuda版本:Win10安装CUDA 10.2_菜鸟学飞ing去看世界的博客-CSDN博客_win10安装cuda10.2

官网下载地址:CUDA Toolkit Archive | NVIDIA Developer

如何装cuda:GPU版本安装Pytorch教程最新方法_1786408496的博客-CSDN博客_pytorch gpu安装

2.4装pytorch

你的环境是python3.9,不支持pytorch1.5,需要安装python3.7.11的虚拟环境

conda create -n py37_torch171 python=3.7

Previous PyTorch Versions | PyTorch

# CUDA 10.2
conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.2 -c pytorch

连外网速度很慢,可以换源

临时换源
pip install pandas -i http://pypi.douban.com/simple/

豆瓣:http://pypi.douban.com/simple/
中科大:https://pypi.mirrors.ustc.edu.cn/simple/
清华:https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云:https://mirrors.aliyun.com/pypi/simple/
腾讯源:http://mirrors.cloud.tencent.com/pypi/simple

添加源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

永久换源:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/


查看源
conda config --show-sources

移除源
conda config --remove channels xxxx

移除全部源
conda config --remove channels

恢复默认的anaconda源
conda config --remove-key channels

https://blog.csdn.net/suiyueruge1314/article/details/105124806

你可能感兴趣的:(深度学习,pytorch,python)