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
相关推荐
p***92482 分钟前
Python使用PyMySQL操作MySQL完整指南
数据库·python·mysql
宠..9 分钟前
安装 Qt VS Tool 插件
开发语言·qt
kali-Myon20 分钟前
NewStarCTF2025-Week5-Web
java·python·安全·web安全·php·web·ctf
未来之窗软件服务21 分钟前
幽冥大陆(三十九)php二维数组去重——东方仙盟筑基期
android·开发语言·算法·php·仙盟创梦ide·东方仙盟·东方仙盟sdk
DFT计算杂谈24 分钟前
Abinit-10.4.7安装教程
linux·数据库·python·算法·matlab
程序猫.24 分钟前
Java零基础入门:集合进阶(下)
java·开发语言
菜鸟-0129 分钟前
QT:BMS_TTL
开发语言·qt
sali-tec33 分钟前
C# 基于halcon的视觉工作流-章65 点云匹配-基于形状
开发语言·人工智能·算法·计算机视觉·c#
不会c嘎嘎39 分钟前
【C++】深入理解多态:从用法到原理
开发语言·c++
武子康1 小时前
Java-179 FastDFS 高并发优化思路:max_connections、线程、目录与同步
java·开发语言·nginx·性能优化·系统架构·fastdfs·fdfs