深度学习环境之框架安装

anaconda 安装

下载

官方链接下载非常慢,可以从如下链接下载
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

$ conda info

     active environment : base
    active env location : /home/chengnanfeng/anaconda3
            shell level : 1
       user config file : /home/chengnanfeng/.condarc
 populated config files : 
          conda version : 4.9.2
    conda-build version : 3.20.5
         python version : 3.8.5.final.0
       virtual packages : __cuda=11.2=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/chengnanfeng/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/chengnanfeng/anaconda3/pkgs
                          /home/chengnanfeng/.conda/pkgs
       envs directories : /home/chengnanfeng/anaconda3/envs
                          /home/chengnanfeng/.conda/envs
               platform : linux-64
             user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.5 Linux/5.8.0-36-generic ubuntu/20.04.1 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

$ 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

$ pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

如果想删除某些 channel,使用如下命令

$ conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

创建环境

$ conda create --name python_38-pytorch_1.7.0 python=3.8

安装pytorch

选择环境

https://pytorch.org/get-started/locally/

pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html -i  https://pypi.mirrors.ustc.edu.cn/simple

pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio===0.7.2  -i  https://pypi.mirrors.ustc.edu.cn/simple

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值