赞
踩
在Linux系统上安装Conda,特别是Miniconda(Conda的一个小型版本,包含conda、Python和一些必要的库,非常适合快速开始使用)的步骤如下:
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py38_4.12.0-Linux-x86_64.sh
请替换版本号和URL以匹配你需要的版本。
chmod +x Miniconda3-py38_4.12.0-Linux-x86_64.sh
(默认通常是~/miniconda3)
,以及是否将conda添加到你的PATH环境变量中。./Miniconda3-py38_4.12.0-Linux-x86_64.sh
export PATH="/path/to/your/miniconda3/bin:$PATH"
将/path/to/your/miniconda3
替换为你的Miniconda实际安装路径。
source ~/.bashrc # 或者是你的相应配置文件
conda activate
conda --version
为了加快后续包的下载速度,你可以设置conda使用国内的镜像源。编辑.condarc文件(位于用户根目录下,如果没有则创建),添加镜像源配置:
channels:
- defaults
show_channel_urls: true
channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda/
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
至此,你就完成了Miniconda在Linux系统上的安装和基本配置,可以开始创建虚拟环境、安装软件包等操作了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。