当前位置: 首页 > news >正文

linux离线安装miniconda环境

1 下载安装包

可以在官网下载最新版

https://www.anaconda.com/download/success#miniconda

或者在软件目录选择合适的版本

https://repo.anaconda.com/miniconda/

安装包传入离线服务器

./Miniconda3-py311_24.9.2-0-Linux-x86_64.sh

2 运行安装包

./Miniconda3-py311_24.9.2-0-Linux-x86_64.sh

屏幕输出:

Welcome to Miniconda3 py311_24.9.2-0

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>

按enter键下一步

显示条款,按q键下一步

输入yes同意条款,按enter键开始安装

Do you accept the license terms? [yes|no]
>>> yes

选择安装位置,按enter键 使用默认的位置:/root/miniconda3

Miniconda3 will now be installed into this location:
/root/miniconda3

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

[/root/miniconda3] >>>

安装完成,屏幕输出:

Preparing transaction: done
Executing transaction: 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

You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>>

输入yes,自动更新shell profile。

no change     /root/miniconda3/condabin/conda
no change     /root/miniconda3/bin/conda
no change     /root/miniconda3/bin/conda-env
no change     /root/miniconda3/bin/activate
no change     /root/miniconda3/bin/deactivate
no change     /root/miniconda3/etc/profile.d/conda.sh
no change     /root/miniconda3/etc/fish/conf.d/conda.fish
no change     /root/miniconda3/shell/condabin/Conda.psm1
no change     /root/miniconda3/shell/condabin/conda-hook.ps1
no change     /root/miniconda3/lib/python3.11/site-packages/xontrib/conda.xsh
no change     /root/miniconda3/etc/profile.d/conda.csh
modified      /root/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

Thank you for installing Miniconda3!

3 查看bashrc

conda已经添加了以下内容


# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/root/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/root/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/root/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/root/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

4 验证安装

重启终端或者输入source ~/.bashrc,就可以看到base环境

source ~/.bashrc

python --version

正常输出python版本,安装结束

http://www.dtcms.com/a/47967.html

相关文章:

  • 如何将本地项目提交到 GitHub
  • 登录服务器后如何找到对应的drupal所在的文件夹
  • FPGA-DE2115开发板实现4位全加器、3-8译码器。
  • Ribbon实现原理
  • 清华DeepSeek深度探索与进阶指南
  • 扫描纸质文件转pdf---少页数+手机+电脑协作
  • 01. HarmonyOS应用开发实践与技术解析
  • 2025-3-3 二叉树的存储结构
  • Makefile
  • 【Java EE】JavaEE导读,探寻 JavaEE:解锁企业级开发的璀璨密码与进阶指南
  • 论文学习——The Hilti SLAM Challenge Dataset
  • iOS逆向工程概述与学习路线图
  • DeepSeek、Grok、ChatGPT4.5和Gemini四大AI模型深度解析:谁才是你的最佳助手
  • 704. 二分查找
  • 深入解析 I²C 与 SPI 协议:原理、时序及软件实现
  • Git强制覆盖分支:将任意分支完全恢复为main分支内容
  • IO进程线程
  • 2025华为OD机试真题目录【E卷+A卷+B卷+C卷+D卷】持续收录中...
  • 基于RK3588的重症监护信息系统应用解决方案
  • 深拷贝与浅拷贝
  • 微服务,服务治理nacos,负载均衡LOadBalancer,OpenFeign
  • Leetcode 662: 二叉树最大宽度
  • 大白话跨域问题的原理与多种解决方法的实现
  • 信息学奥赛一本通1009
  • el-table input textarea 文本域 自适应高度,切换分页滚动失效处理办法
  • 【Linux实践系列】:用c语言实现一个shell外壳程序
  • HTML + CSS 题目
  • C语言基础知识02
  • 安防监控/视频集中存储EasyCVR视频汇聚平台如何配置AI智能分析平台的接入?
  • 分布式锁—2.Redisson的可重入锁二