Python
1 基础知识
1.1 软件的介绍
– Miniforge是一个存储库
– Miniforge包含conda-forge特有的Conda和Mamba最小安装程序
1.2 软件的功能
– Miniforge的基础软件包来自于conda-forge频道
– Miniforge的基础软件包的默认唯一频道为conda-forge。
– Miniforge包含conda-forge特有的Conda和Mamba最小安装程序
1.3 安装要求
| OS | Architecture | Minimum Version | File |
| Linux | x86_64 (amd64) | glibc >= 2.17 | Miniforge3-Linux-x86_64.sh |
| Linux | aarch64 (arm64) (**) | glibc >= 2.17 | Miniforge3-Linux-aarch64.sh |
| Linux | ppc64le (POWER8/9) | glibc >= 2.17 | Miniforge3-Linux-ppc64le.sh |
| macOS | x86_64 | macOS >= 10.13 | Miniforge3-MacOSX-x86_64.sh |
| macOS | arm64 (Apple Silicon) (***) | macOS >= 11.0 | Miniforge3-MacOSX-arm64.sh |
| Windows | x86_64 (****) | Windows >= 10 | Miniforge3-Windows-x86_64.exe |
2 最佳实践
2.1 环境信息
OS = Oracle Linux Server 9.x x86_64
Host Name = any
IP Address = any
2.2 安装应用
2.2.1 下载应用
wget https://github.com/conda-forge/miniforge/releases/download/25.11.0-1/Miniforge3-25.11.0-1-Linux-x86_64.sh
以上只是命令行演示,如果下载异常或者需要其他版本,请参阅如下连接,
https://github.com/conda-forge/miniforge/releases
2.2.2 安装应用
bash Miniforge3-25.11.0-1-Linux-x86_64.sh
参阅如下向导安装,
#... Please, press ENTER to continue >>> #... Do you accept the license terms? [yes|no] >>> yes #... [/root/miniforge3] >>> /opt/miniforge3 #... Proceed with initialization? [yes|no] [no] >>>
2.2.3 设置环境变量
vim /etc/profile.d/miniforge3.sh
增加如下设置,
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/miniforge3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/miniforge3/etc/profile.d/conda.sh" ]; then
. "/opt/miniforge3/etc/profile.d/conda.sh"
else
export PATH="/opt/miniforge3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba shell init' !!
export MAMBA_EXE='/opt/miniforge3/bin/mamba';
export MAMBA_ROOT_PREFIX='/opt/miniforge3';
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
alias mamba="$MAMBA_EXE" # Fallback on help from mamba activate
fi
unset __mamba_setup
# <<< mamba initialize <<<
配置创建后,你需要执行如下命令创建配置,
source /etc/profile
2.2.4 测试配置
conda -V
正常可见如下配置,
conda 25.11.0
2.2.5 设置默认为Linux Shell
conda config --set auto_activate_base false
安装后默认为“Conda Base Shell”,如果需要查看设置后的状态,请执行如下命令,
conda config --show | grep -i activate
可见如下显示,
auto_activate: False
如果需要反向操作,
conda config --set auto_activate true
参阅文档
=================
https://github.com/conda-forge/miniforge
没有评论