Install anaconda and then install cudatoolkit
I use the system Ubuntu.
Open the link:
https://www.anaconda.com/download/#linux
I choose the python 2.7 x86_64.As matter of fact,I do not clearly understand the version of the python written by the web.
My system has the version python 2.7,and version python 3.5.I do not know the version is used to match or create, so I choose python 2.7.
Then install it.
I think just run the shell.
sudo bash Anaconda2-2018.12-Linux-x86_64.sh
Then it could be installed sucsessfully default create a fold in
~/anaconda2
I try cd in the fold and activate the environment.
cd ~/anaconda2/bin
source activate
output
(base) your@your-node:~/anaconda2/bin$
Seems like I am in the anaconda environment now.
Then I try to install the cudatoolkit
conda install cudatoolkit
Unfortunately, it failed. Thanks to the GFW.
I think of a way is that change the origins of conda.
Wow,it will make it.
And the conda indeed can change the origins config.
run the shell below.
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
rerun the shell.
conda install cudatoolkit
I was surprised that it failed finally.
output
PermissionError: [Errno 13] Permission denied: '/home/your/anaconda2/.condatmp'
oh oh oh.
I made a mistake at the beginning that installing anaconda with shell which do not need use sudo.
bash Anaconda2-2018.12-Linux-x86_64.sh
And I understand the version of python in the web. That just means create corrospond python version in anaconda virtual environment.
So I can download python 3.7 in despite the version of python in my system.
Create it. Enjoy it.