Anaconda中构建深度学习开发环境记录(Win10下测试)

有人问我Win10下深度学习环境的构建,个人觉得应该和Win7差不多,但出于负责还是亲自尝试记录一下。下面所说的命令都是亲测可用的。
我的平台是:Python3.6(Anaconda4.3)+CUDA10.0+windows10,提前去NVIDIA官网下载CUDA和cuDNN,配置见我的另一篇博客,这里不再赘述

  • 设置源
    2019年6月5日Anaconda清华源又恢复使用了,很好!!
    在annaconda命令行中使用一下命令就可以设置源。
    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
    conda config --set show_channel_urls yes

  • 虚环境
    conda create -n deeplearning python=3.6
    conda info -e
    activate deeplearning

  • tensorflow
    GPU版本:
    anaconda search -t conda tensorflow-gpu
    anaconda show anaconda/tensorflow-gpu
    conda install --channel https://conda.anaconda.org/anaconda tensorflow-gpu=1.13.1

    CPU版本:
    anaconda search -t conda tensorflow
    anaconda show conda-forge/tensorflow
    conda install --channel https://conda.anaconda.org/conda-forge tensorflow=1.13.1

  • keras
    #anaconda search -t conda keras-gpu
    #anaconda show anaconda/keras-gpu
    #conda install --channel https://conda.anaconda.org/anaconda keras-gpu=2.2.4
    #以上命令会提示:The following packages will be SUPERSEDED by a higher-priority channel,所以最好不要确认安装
    pip install keras

  • Jupyter支持多个kernel
    conda install nb_conda

  • 其他包的安装
    conda install matplotlib
    conda install pandas
    conda install scikit-learn

  • pytorch
    在线安装方式:
    Pytorch官网,选择自己的平台,如我的:
    在这里插入图片描述
    GPU版本:conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
    CPU版本:conda install pytorch-cpu torchvision-cpu -c pytorch
    目前最新的是1.1.0
    这里为节约时间采用离线本地安装方法,:
    下载地址:清华园Pytorch
    GPU版本::conda install --use-local pytorch-1.1.0-py3.6_cuda100_cudnn7_1.tar.bz2
    CPU版本安装:conda install --use-local pytorch-cpu-1.1.0-py3.6_cpu_1.tar.bz2
    Torchvision:这个主要集成了一些数据集,深度学习模型,一些转换等,以后需要使用还是很方便的,pip install torchvision

猜你喜欢

转载自blog.csdn.net/cskywit/article/details/93336304