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
相关推荐
qq_380619163 分钟前
如何在phpMyAdmin中处理特殊字符账号名的授权_反引号的正确包裹
jvm·数据库·python
2201_756847336 分钟前
HTML函数在老旧浏览器运行慢是硬件问题吗_软硬协同分析【教程】
jvm·数据库·python
晓纪同学8 分钟前
EffctiveC++_第三章_资源管理
开发语言·c++·算法
蚊子码农16 分钟前
每日一题--C语言指针与内存泄漏:一道小问题的深度复盘
c语言·开发语言
Fanfanaas16 分钟前
Linux 系统编程 进程篇(一)
linux·运维·服务器·c语言·开发语言·网络·学习
星辰徐哥19 分钟前
ARP缓存表:作用、查看方法与刷新技巧
开发语言·缓存·php
雨墨✘22 分钟前
CSS如何提高团队协作效率_推广BEM规范减少样式沟通成本
jvm·数据库·python
ego.iblacat22 分钟前
lvs 集群部署
开发语言·php·lvs
沐雪轻挽萤24 分钟前
6. C++17新特性-编译期 if 语句 (if constexpr)
开发语言·c++
水云桐程序员26 分钟前
C语言编程基础,输入与输出
c语言·开发语言·算法