Linux上Anaconda安装教程

在这里插入图片描述
本文作者: slience_me


Anaconda安装

在选择anaconda版本的时候,需要查看 Linux 系统的架构,可以使用 uname 命令。以下是查看系统架构的方法:

uname -m

运行上述命令后,系统将返回一个字符串,表示系统的架构。常见的架构包括:

  • x86_64:表示64位的 x86 架构,通常用于现代的台式机和服务器。
  • i686i386:表示32位的 x86 架构,用于一些较旧的系统。
  • arm:表示ARM架构,通常用于嵌入式系统和一些移动设备。
  • aarch64:表示64位的ARM架构。

例如,如果返回的是 x86_64,则表示你的系统是64位的 x86 架构。

例如,我的是下图所示:

image-20240118193034121

在anaconda的 点击 下载链接, 选择对应的版本

image-20240118193206053

ubuntu操作步骤

  1. 运行指令bash Anaconda3-2021.11-Linux-x86_64.sh
  2. 进入注册信息页面,持续点击空格即可跳过注册信息, 输入yes;
  3. 阅读注册信息,然后输入yes;查看文件即将安装的位置,按enter,即可安装,
  4. 安装完成后,收到加入环境变量的提示信息,输入yes
  5. 重启终端,会看到命令行前面出现(base)环境,即可默认使用Anaconda3;
  6. 可以使用conda -V验证是否安装完毕,若安装完成,则会出现版本号。

执行下面指令后,回车即可:

[slience_me@VM-24-2-centos ~]$ bash Anaconda3-2023.09-0-Linux-x86_64.sh 
Welcome to Anaconda3 2023.09-0
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 

输入yes即可,同意该使用协议

==================================================
End User License Agreement - Anaconda Distribution
==================================================
Copyright 2015-2023, Anaconda, Inc.
All rights reserved under the 3-clause BSD License:
This End User License Agreement (the "Agreement") is a legal agreement between you and Anaconda, Inc. ("Anaconda") and governs your use of Anaconda Distribution (which was formerly known as Anaconda Individual Edition).
......
Do you accept the license terms? [yes|no]
[no] >>> yes

选择安装的路径,直接回车就使用默认路径/home/slience_me/anaconda3

Anaconda3 will now be installed into this location:
/home/slience_me/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/slience_me/anaconda3] >>> 
PREFIX=/home/slience_me/anaconda3
Unpacking payload ...                              
Installing base environment...
Downloading and Extracting Packages
Downloading and Extracting Packages
Preparing transaction: done
Executing transaction: \ 
    Installed package of scikit-learn can be accelerated using scikit-learn-intelex.
    More details are available here: https://intel.github.io/scikit-learn-intelex
    For example:
        $ conda install scikit-learn-intelex
        $ python -m sklearnex my_application.py                                                                               done
installation finished.
Do you wish to update your shell profile to automatically initialize conda?
This will activate conda on startup and change the command prompt when activated.
If you'd prefer that conda's base environment not be activated on startup,
   run the following command when conda is activated:
conda config --set auto_activate_base false

是否初始化环境变量,选择yes即可

You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>> yes
no change     /home/slience_me/anaconda3/condabin/conda
no change     /home/slience_me/anaconda3/bin/conda
no change     /home/slience_me/anaconda3/bin/conda-env
no change     /home/slience_me/anaconda3/bin/activate
no change     /home/slience_me/anaconda3/bin/deactivate
no change     /home/slience_me/anaconda3/etc/profile.d/conda.sh
no change     /home/slience_me/anaconda3/etc/fish/conf.d/conda.fish
no change     /home/slience_me/anaconda3/shell/condabin/Conda.psm1
no change     /home/slience_me/anaconda3/shell/condabin/conda-hook.ps1
no change     /home/slience_me/anaconda3/lib/python3.11/site-packages/xontrib/conda.xsh
no change     /home/slience_me/anaconda3/etc/profile.d/conda.csh
modified      /home/slience_me/.bashrc
==> For changes to take effect, close and re-open your current shell. <==
Thank you for installing Anaconda3!
  • 9
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
当然,我可以帮助你安装AnacondaLinux系统上。请按照以下步骤进行操作: 1. 首先,从Anaconda官方网站(https://www.anaconda.com/products/individual)下载适用于Linux系统的Anaconda安装包。选择合适的版本(Python 2.x或3.x,64位或32位),然后复制下载链接。 2. 打开终端,并使用wget命令下载Anaconda安装包。在终端中输入以下命令: ``` wget <下载链接> ``` 将`<下载链接>`替换为你刚刚复制的Anaconda安装包的下载链接。 3. 下载完成后,运行以下命令来安装Anaconda: ``` bash Anaconda<版本号>-Linux-<架构>.sh ``` 将`<版本号>`替换为你下载的Anaconda版本号,将`<架构>`替换为你的系统架构(64位或32位)。例如,如果你下载的是Anaconda3 2021.05版本,并且你的系统是64位,那么命令应该是: ``` bash Anaconda3-2021.05-Linux-x86_64.sh ``` 4. 运行上述命令后,会显示一系列安装提示。请阅读并按照提示进行操作。可以通过按Enter键或输入“yes”来接受默认设置。 5. 安装程序将询问你是否要将Anaconda添加到系统的PATH中。建议选择“Yes”,这样你就可以在终端中直接使用Anaconda。 6. 完成安装后,关闭并重新打开终端。输入以下命令来验证Anaconda是否安装成功: ``` conda --version ``` 如果能够显示Anaconda的版本号,说明安装成功。 恭喜你,现在Anaconda已经成功安装在你的Linux系统上了!你可以使用`conda`命令来管理和创建Python环境,以及安装各种包和工具。希望这个教程对你有所帮助!如果还有其他问题,请随时提问。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

slience_me

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值