1、通过命令行工具
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-4.3.0-Linux-x86_64.sh
wget 获取 anaconda3 的路径,下载完成后用 bash 安装 anaconda3
下载完成后可用命令 ls -al 查看
接着用 bash anaconda3.5.2.0-Linux-x86_64.sh
一路 yes
2、遇到问题:
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
解决方法很简单,只要安装 bzip2 就行了,yum 安装的命令如下:
yum -y install bzip2
3、再次安装,bash anaconda3.5.2.0-Linux-x86_64.sh
出现问题:ERROR: File or directory already exists: /root/anaconda3
解决方案:删除即可 rm -rf /root/anaconda3
4、回车默认安装到/root/anaconda3
5、安装完成,写一个 /root/.bashrc 文件。增加环境变量
编辑 vi /root/.bashrc 这个配置文件
之后使用 source ~/.bashrc 激活配置文件
最后 输入 Python 就会出现正确结果了
在终端输入 python/python3,则会启动 python 交互界面。如果 andconda 被成功安装并且可以运行,则将会在 python 版本号右边显示 anaconda 的版本号。
退出 python 交互界面则输入 exit() 或 quit()
6、在终端中输入命令 conda list,如果 anaconda 被成功安装,则会显示安装的包名和版本号