社区发行,是anaconda的轻量化,完全开源,首推用这种方式开启python,地址。有好几种不同的版本,推荐下载mambaforge(用manba代替了conda)。
下载安装完毕后,配置环境变量:
- C:_Code\mambaforge —— (Python MambaPython)
- C:_Code\mambaforge\Scripts —— (Mamba&Conda Scripts MambaScript)
配置完成后,cmd输入python检测。(windows下会出现输入python后打开应用商店的情况,这时候进入“应用执行别名”,把python相关的“应用安装程序”关掉即可)
配置文件
配置文件为~.condarc,打开配置文件,进行编辑。因为是国内,所以需要配置镜像。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| default_channels: - https: - https: - https: custom_channels: conda-forge: https: msys2: https: bioconda: https: menpo: https: pytorch: https: pytorch-lts: https: simpleitk: https: show_channel_urls: true ssl_verify: false
|
使用
和conda的用法一样,用“mamba”命令替代“conda”。mamba命令不起作用的话,就用conda。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| mamba --version
mamba info
mamba update mamba
mamba create -n <env_name>
mamba create -n [env_name] python=3.9.12
mamba env create -f environment.yaml
conda activate <env_name>
conda deactivate
conda env list
mamba remove --name <env_name> --all
conda install pip
mamba create -n name2 --clone name
mamba remove -n <name> --all
|