zoukankan      html  css  js  c++  java
  • pytorch(1)-----环境安装

    1、anconda

    1.1  下载合适的版本,安装后。

            在终端输入:sudo   gedit ~/.bashrc

           添加: export PATH=~/anaconda3/bin:$PATH

            在终端输入: source ~/.bashrc

    1.2  anconda 更换下载源

    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

    1.3  anconda 基本使用命令

      创建 python 环境命令:conda create --name [虚拟环境名] python=[版本]

    conda create --name tf-p36 python=3.6

          复制一个环境: conda create -n [新环境名称] –clone [要复制的环境名称]   如:conda create -n tf –clone tf36

           激活(切换)到相应的 python 环境:  conda activate [环境名称]

           查看当前拥有的虚拟环境列表:  conda env list

           查看当前 python 环境已经安装的工具包:: conda list

           安装工具包,到当前环境:   conda install [name]==[版本号] , 也可以不指定版本号如: conda install numpy

            卸载某个工具包: conda remove [package_name]

    2、python 相关开发工具

         pip install Jupyter

    3、NVIDIA 驱动

        Ubuntu 16.04  以上可通过如下方式安装

        a、 卸载原有的驱动: sudo apt-et purge nvidia*
        b、 添加 PPA 源: sudo add-apt-repository ppa:graphics-drivers
        c、 更新: sudo apt-get update
        d、 检查可用的驱动: ubuntu-drivers devices     安装驱动: sudo apt install nvidia-384   

       对照表参考: https://docs.nvidia.com/cuda/cuda-toolkitrelease-notes/index.html

    4、cuda  cudnn

         conda install cudatoolkit==9.0

         conda install cudnn==7.6.4

    5、pytorch及相关工具

    conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
    参考:https://pytorch.org/

    6、其他效率工具

         sudo apt install terminator   终端分屏工具 :  ctrl+shift+t打开终端  ;  ctrl+shift+e  水平分割终端 ;

                          ctrl+shift+o 垂直分割;ctrl+shift+w 关闭当前  ;ctrl+shift+Q 关闭所有的

       

  • 相关阅读:
    学习笔记008之Task
    问题: ActivityManager: Warning: Activity not started, its current task has been brought to the front
    问题; No label views point to this text field with an android:labelFor="@+id/@+id/editTextNumber1" attribute
    学习笔记001之[Android开发视频教学].01_06_Android当中的常见控件
    学习笔记002之学习资料
    学习笔记001之环境配置
    设计模式之代理模式
    C# Enum转换
    Json数据序列化对象,及对象序列化为Json格式
    groupby以后取每组前n行
  • 原文地址:https://www.cnblogs.com/feihu-h/p/12301792.html
Copyright © 2011-2022 走看看