Miniforge 管理 Python 虚拟环境
Windows
安装
Miniforge官方GitHub仓库:https://github.com/conda-forge/miniforge/releases
下载适用于Windows的最新版本安装程序(Miniforge3-Windows-x86_64.exe)
验证:conda --version
创建虚拟环境
1 | conda create -n myenv python=3.10 |
myenv环境名称python=3.10指定Python版本
常用命令
1 | # 查看所有环境 |
Linux(CentOS)
1 | wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh |
国内镜像下载(不依赖 GitHub)
清华 TUNA 镜像站有完整同步:
1 | wget https://mirrors.tuna.tsinghua.edu.cn/github-release/conda-forge/miniforge/LatestRelease/Miniforge3-Linux-x86_64.sh |
或者清华的 Anaconda 镜像(Miniconda 替代):
1 | wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh |
换源
查看当前配置:conda config --show
编辑配置:vim ~/.condarc
1 | channels: |