Linux服务器中安装Anaconda+Tensorflow+Keras

Anaconda安装

  1. https://repo.anaconda.com/archive/查看你需要下载的Anaconda版本,例如2020.11的x86_64(uname -a 查看linux框架)版

  2. 下载Anaconda到linux服务器,

    python 复制代码
    wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
  3. 安装anaconda:

    python 复制代码
    bash ​Anaconda3-2020.11-Linux-x86_64.sh

创建python虚拟环境

python 复制代码
conda create -n Vpython python=3.6.9
# Vpython: Env name
# python=3.6.9 indicates the version of python for this env
  1. 设置Linux默认的python虚拟环境

    python 复制代码
    vi ~/.bashrc # append a Line 'conda activate Vpython' in the end of this file
    
    
    
    
    # Uncomment the following line if you don't like systemctl's auto-paging feature:
    # export SYSTEMD_PAGER=
    
    # User specific aliases and functions
    
    # >>> conda initialize >>>
    # !! Contents within this block are managed by 'conda init' !!
    __conda_setup="$('/home/ZLM/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
    if [ $? -eq 0 ]; then
        eval "$__conda_setup"
    else
        if [ -f "/home/ZLM/anaconda3/etc/profile.d/conda.sh" ]; then
            . "/home/ZLM/anaconda3/etc/profile.d/conda.sh"
        else
            export PATH="/home/ZLM/anaconda3/bin:$PATH"
        fi
    fi
    unset __conda_setup
    # <<< conda initialize <<<
    conda activate Vpython
  2. 安装版本兼容的tensorflow和keras

    python 复制代码
    # Install keras and Tensorflow
    pip install TensorFlow==2.0.0
    pip install keras==2.3.1
    
    
    ####Intall other libs
    pip install numpy
    pip install matplotlib
    pip install scipy
相关推荐
练习时长一年4 分钟前
jdk动态代理的实现原理
java·开发语言
无限进步_15 分钟前
深入理解C语言scanf函数:从基础到高级用法完全指南
c语言·开发语言·c++·后端·算法·visual studio
Wild_Pointer.21 分钟前
Qt Creator:避免QRunnable和QObject多重继承
开发语言·qt
三无少女指南22 分钟前
关于JVM调优,我想聊聊数据和耐心
java·开发语言·jvm
2301_7644413343 分钟前
身份证校验工具
前端·python·1024程序员节
南棱笑笑生1 小时前
20251027在Ubuntu20.04.6上编译AIO-3576Q38开发板的Buildroot系统解决qt5webengine编译异常的问题
开发语言·qt·rockchip
沅霖1 小时前
android kotlin语言中的协程
android·开发语言·kotlin
xiaobobo33301 小时前
c语言中const关键字和枚举enum的新认识
c语言·开发语言·const·enum
葛小白11 小时前
C#数据类型:List
开发语言·c#
合作小小程序员小小店1 小时前
web开发,在线%蛋糕销售%管理系统,基于asp.net,webform,c#,sql server
开发语言·后端·asp.net·html5·教育电商