https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 国内镜像,下载速度快。不要选择最新版,有问题,建议 4.3.0。
运行命令 conda -V,返回版本号即安装成功。
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被成功安装,则会显示安装的包名和版本号