zoukankan      html  css  js  c++  java
  • anaconda tensorflow tflearn 自动安装脚本 anaconda使用-b可以非交互式安装

    install_dir=/usr/local/anaconda3
    
    DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"  # script dir
    bash $DIR/Anaconda3-5.0.1-Linux-x86_64.sh -b -p  $install_dir
    
    $install_dir/bin/conda install --use-local $DIR/mock-2.0.0-py36_0.tar.bz2
    $install_dir/bin/conda install --use-local $DIR/pbr-3.1.1-py36_0.tar.bz2
    $install_dir/bin/conda install --use-local $DIR/protobuf-3.5.1-py36_3.tar.bz2
    $install_dir/bin/conda install --use-local $DIR/tensorflow-1.4.0-py36_0.tar.bz2
    $install_dir/bin/conda install --use-local $DIR/tflearn-0.3.2-py36_0.tar.bz2
    
    export LD_LIBRARY_PATH=$install_dir/lib/:$LD_LIBRARY_PATH
    export PATH=$install_dir/bin:$PATH
    
    # test if all python lib install correctly
    $install_dir/bin/python -c "import tensorflow"
    if [[ $? == "0" ]]; then
      echo "tensorflow install successfully!"
    else
      echo "tensorflow install failed!"
      exit 1
    fi
    
    $install_dir/bin/python -c "import tflearn"
    if [[ $? == "0" ]]; then
      echo "tflearn install successfully!"
    else
      echo "tflearn install failed!"
      exit 1
    fi# add to source env file
    env_file=$DIR//detect_env.sh
    echo "#!/usr/bin/bash" > $env_file
    echo "export LD_LIBRARY_PATH=$install_dir/lib/:$LD_LIBRARY_PATH" >> $env_file
    echo "export PATH=$install_dir/bin:$PATH" >> $env_file
    echo "!!!Important!!!"
    echo "Please use source $env_file to use tensorflow and tflearn...."
  • 相关阅读:
    RSA使用
    C#获取主机信息
    NSIS打包软件使用
    C#获取局域网主机
    C#实现Web链接启动应用程序
    4.布局介绍
    Server Sql 多表查询、子查询和分页
    C# File类常用方法
    Vue 使用技巧手记
    前端面试题手记
  • 原文地址:https://www.cnblogs.com/bonelee/p/8623909.html
Copyright © 2011-2022 走看看