linux 安装 tensorflow

一、安装python3

软件源

  1. 下载软件
    1
    2
    3
    mkdir -p /soft 
    cd /soft
    wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz
  2. 安装
    1
    2
    3
    4
    5
    tar xf Python-3.6.6.tgz
    cd Python-3.6.6
    mkdir -p /usr/local/python3
    ./configure --prefix=/usr/local/python3
    make && make install
  3. 配置环境变量
    1
    2
    3
    4
    ln -s /usr/local/python3/bin/python3 /usr/bin/python3
    vim ~/.bash_profile
    PATH=$PATH:$HOME/bin:/usr/local/python3/bin
    source ~/.bash_profile

二、安装GLIBC2.16

软件源

  1. 下载软件
1
2
3
mkdir -p /soft 
cd /soft
wget http://ftp.gnu.org/pub/gnu/glibc/glibc-2.16.0.tar.gz
  1. 安装
    1
    2
    3
    4
    5
    tar xf glibc-2.16.0.tar.gz
    cd glibc-2.16.0
    mkdir -p build && cd build
    ../configure --prefix=/opt/glibc-2.14
    make && make install
  2. 配置环境变量
    1
    2
    3
    4
    ln -s /usr/local/python3/bin/python3 /usr/bin/python3
    vim ~/.bash_profile
    PATH=$PATH:$HOME/bin:/usr/local/python3/bin
    source ~/.bash_profile