安装anaconda
首先在anaconda的清华镜像 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
下载anaconda3-5.1.0-Linux-x86-64.sh
$ sudo bash Anaconda3-5.1.0-Linux-x86_64.sh
然后Do you accept the license terms? [yes|no]
输入yes
我直接安装在默认目录:Anaconda3 will now be installed into this location:
/home/cassiel/anaconda3
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/cassiel/.bashrc ? [yes|no]
[no] >>> yes
就会自动加入环境变量
$ sudo vim ~/.bashrc
可以看到末尾如图:
加入
$ export PATH="$PATH:$HOME/bin"
$ alias pyana3="/home/cassiel/anaconda3/bin/python3" (写自己的用户名)