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 分钟前
go语言学习(基本数据类型)
开发语言·学习·golang·数据类型
Y001112365 分钟前
MySQL-进阶
开发语言·数据库·sql·mysql
Crazy________10 分钟前
docker4.8
java·开发语言·eureka
小白学大数据11 分钟前
Selenium+Python 爬虫:动态加载头条问答爬取
爬虫·python·selenium
山甫aa13 分钟前
List 容器 -----C++的stl学习
开发语言·c++·学习
cch891814 分钟前
Laravel 2.x:早期框架的奠基之路
java·开发语言
t1987512817 分钟前
光伏发电MPPT(最大功率点跟踪)MATLAB仿真程序
开发语言·matlab
Hui Baby21 分钟前
springboot读取配置文件
后端·python·flask
阿Y加油吧27 分钟前
回溯法经典难题:N 皇后问题 深度解析 + 二分查找入门(搜索插入位置)
开发语言·python
leo_messi9432 分钟前
2026版商城项目(三)-- ES+认证服务
后端·python·django