No permission to install anaconda and tensorflow-gpu under linux

Anaconda

First install anaconda in their own user directory

./Anaconda3-5.0.1-Linux-x86_64.sh

Add anaconda environment after the installation is complete

vim ~/.bashrc
export PATH=/home/zhangyt/anaconda3/bin:$PATH
source ~/.bashrc

Add Tsinghua mirror, execute the following command twice, the first place Tsinghua mirror

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

 Creating pythonn3.6 interpreter

conda create -n py36 python=3.6

Add cuda and cudnn environment, the server is already installed and cudnn cuda, need to know where they are installed

vim ~/.bashrc
export PATH=/usr/local/cuda-10.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH
source ~/.bashrc

 First upgrade about pip

pip install --upgrade pip

Start the installation tensorflow-gpu = 1.13.1

pip install tensorflow-gpu==1.13.1

Test TensorFlow (GPU) whether the installation is successful

source activate py36

Then type python 

import tensorflow as tf
hello = tf.constant('hello world')
sess=tf.Session()
print(sess.run(hello))

Shown below, described tensorflow-gpu been installed successfully

 

 

 

 

 

Published 102 original articles · won praise 117 · views 330 000 +

Guess you like

Origin blog.csdn.net/pursuit_zhangyu/article/details/104790035