• AI常用环境安装


    torch环境

    conda create --name py37 python=3.7

    conda activate py37

    pip install jieba==0.42.1
    pip install pandas==1.2.4
    pip install pydot==1.3.0
    pip install pydotplus==2.0.2
    pip install pyplotz==0.24
    pip install pyspark==2.2.1
    pip install scikit-learn==0.24.2
    pip install termcolor==1.1.0
    pip install tqdm==4.61.1
    pip install xgboost==1.4.2

    pip install matplotlib

    pytorch安装

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

    torch的linux GPU环境 ,CUDA 10.2

    pip3 install torch torchvision torchaudio

    conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

     在进行GPU安装时,pip不需要指定CUDA的版本

    torch的linux CPU环境

    pip3 install torch==1.9.0+cpu torchvision==0.10.0+cpu torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
    conda install pytorch torchvision torchaudio cpuonly -c pytorch

    conda install pyqt
    pip install opencv-python==4.1.2.30

    设置默认ubantu默认的python为conda的python环境

    conda config --set auto_activate_base false  #默认不启动conda环境

    root@aisty:~# cat /etc/profile|grep conda
    export PATH=/opt/app/anaconda3/envs/py37/bin:/opt/app/anaconda3/bin:$PATH

  • 相关阅读:
    linux的usr目录的全称是什么
    python多线程与多进程及其区别
    redis禁用危险命令
    测试文档
    mysql5.7.23windows安装
    Nginx如何处理手机端和PC端跳转不同页面
    nginx if多条件判断
    centos7单用户模式修改密码
    Django其四
    Django简单搭建编辑页面
  • 原文地址:https://www.cnblogs.com/perfei/p/15082706.html
Copyright © 2020-2023  润新知