步骤
安装Anaconda3
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.02-Linux-x86_64.sh
如果提示没有wget,使用yum安装:
yum -y install wget
在下载目录中执行该文件,根据下载的版本不同,名称会有不同:
bash Anaconda3-2020.02-Linux-x86_64.sh
接下来会出现一堆的License许可声明,一路回车向下,出现如下文字,输入yes:
Do you accept the license terms? [yes|no]
[no] >>>
Please answer 'yes' or 'no':
>>> yes
之后要选择安装目录,如果无需更改直接回车Enter,如需更改要输入绝对路径:
(可以先查看下硬盘的挂载情况再自行选择安装目录,查看挂载情况的语句是df -h)
Anaconda3 will now be installed into this location:
/root/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/root/anaconda3] >>>
出现如下信息:
ERROR: File or directory already exists: '/root/anaconda3'
If you want to update an existing installation, use the -u option.
安装到一个新的路径,比如/root/caozx/22-anaconda3(22-anaconda3还未创建)
[/root/anaconda3] >>> /root/caozx/22-anaconda3
询问是否初始化,若选择yes,是在/root/.bashrc目录中自动添加环境变量,会使得开机自动启动base环境。(这里应该是新版安装包的改动之处,老版本的安装包都是问是否需要添加conda至环境变量,且默认直接回车Enter是不添加,若未添加后续需要手动添加。)
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> no
看到如下提示则安装成功:
Thank you for installing Anaconda3!
===========================================================================
Anaconda and JetBrains are working together to bring you Anaconda-powered
environments tightly integrated in the PyCharm IDE.
PyCharm for Anaconda is available at:
https://www.anaconda.com/pycharm
配置环境变量:
vim /etc/profile
# anaconda3
export PATH
CentOS使用Anaconda搭建Tensorflow环境指南

本文详细介绍了如何在CentOS系统上通过Anaconda3安装并创建虚拟环境,以及如何在环境中安装Tensorflow。首先,通过yum安装wget,然后下载并安装Anaconda3,同意许可协议并选择安装路径。接着,配置环境变量,创建支持Tensorflow的Python 3.5环境。在conda环境中安装Tensorflow时可能会遇到问题,文章提供了参考资料以解决安装过程中遇到的错误。
最低0.47元/天 解锁文章
394

被折叠的 条评论
为什么被折叠?



