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
相关推荐
智慧地球(AI·Earth)几秒前
规则引擎实战:Python中re库和pyknow库规则引擎实战教程
开发语言·python·程序人生
是小蟹呀^14 分钟前
【总结】LangChain中的中间件Middleware
python·中间件·langchain·agent
qq_3422958214 分钟前
如何为容器内多个列表实现统一滚动条.txt
jvm·数据库·python
小雅痞26 分钟前
[Java][Leetcode hard] 42. 接雨水
java·开发语言·leetcode
We་ct29 分钟前
AI辅助开发术语体系深度剖析
开发语言·前端·人工智能·ai·ai编程
t***54430 分钟前
Dev-C++中哪些选项可以设置
开发语言·c++
FreakStudio33 分钟前
MicroPython对接大模型:uopenai + 火山方舟实现文字聊天和图片理解
python·单片机·ai·嵌入式·面向对象·电子diy
Kimliao16637 分钟前
TFT-LCD液晶显示模组常见驱动电压的作用
python
輕華39 分钟前
PyQt5入门实战:安装、QtDesigner设计与PyUIC转换完整指南
开发语言·qt
qq_2069013940 分钟前
CSS如何引入自适应图标_利用svg外链配合css控制颜色
jvm·数据库·python