install_dir=/usr/local/anaconda3DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # script dirbash $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.bz2export LD_LIBRARY_PATH=$install_dir/lib/:$LD_LIBRARY_PATHexport 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 1fi$install_dir/bin/python -c "import tflearn"if [[ $? == "0" ]]; then echo "tflearn install successfully!"else echo "tflearn install failed!" exit 1fi# add to source env fileenv_file=$DIR//detect_env.shecho "#!/usr/bin/bash" > $env_fileecho "export LD_LIBRARY_PATH=$install_dir/lib/:\$LD_LIBRARY_PATH" >> $env_fileecho "export PATH=$install_dir/bin:\$PATH" >> $env_fileecho "!!!Important!!!"echo "Please use source $env_file to use tensorflow and tflearn...."