1.下载安装包
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
或是
https://www.anaconda.com/distribution/#download-section
下载了Anaconda3-2019.10-Linux-x86_64.sh
2.安装
cd /下载 bash Anaconda3-2019.10-Linux-x86_64.sh
3.安装过程一直按Enter,最后提示 Do you wish the installer to initialize Anaconda3 by running conda init ? 输入 no,回车
4.修改环境变量
vim ~/.bashrc
确保conda initialize中路径配置的和真实系统中的路径一致。
# >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/home/xl/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/home/xl/anaconda3/etc/profile.d/conda.sh" ]; then . "/home/xl/anaconda3/etc/profile.d/conda.sh" else export PATH="/home/xl/anaconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<<
5.命令行输入conda info 显示的activate地址不对,修改
命令行输入:conda activate anaconda3安装的正确的地址
conda activate /home/xl/anaconda3
6.验证安装成功
命令行输入:python3
输出:
Python 3.7.4 (default, Aug 13 2019, 20:35:49) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>>
ubuntu系统本地python3是3.6版本,anaconda3安装包的python版本是3.7.
验证成功。