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
相关推荐
databook3 分钟前
从直觉到算法:贝叶斯思维的技术底层与工程实现
人工智能·python·机器学习
泯仲4 分钟前
从零起步学习MySQL 第十六章:MySQL 分库分表的考量策略
开发语言·mysql
m0_716667075 分钟前
使用PyQt5创建现代化的桌面应用程序
jvm·数据库·python
超级大福宝8 分钟前
用买火车票的例子讲解Java反射的作用
java·开发语言·后端
小则又沐风a10 分钟前
第一章:C++入门基础--- c++入门门槛高? 逐步剖析c++语法 成为c++大师
开发语言·c++
XW010599911 分钟前
6-1输入列表,求列表元素和(eval输入应用)
python
川石课堂软件测试14 分钟前
接口测试需要注意的一些BUG
网络·数据库·python·单元测试·bug·压力测试·tornado
2401_8535765014 分钟前
定时任务专家:Python Schedule库使用指南
jvm·数据库·python
Oueii23 分钟前
如何为开源Python项目做贡献?
jvm·数据库·python
小鸡吃米…25 分钟前
Python 中的并发 —— 进程池
linux·服务器·开发语言·python