为什么要用mambaforge?
Anaconda 臃肿,
下载
conda-forge/miniforge: A conda-forge distribution. (github.com)
1 | wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe |
配置
mamba init:~/.bash_profile
添加
1 |
|
新建个人环境
新建个人环境,base环境不装东西
1 | conda create -n achuan --clone base |
安装基础包:vim equirements.txt
1 | autopep8 |
安装
1 | mamba install --yes --file requirements.txt |
配置镜像
vim ~/.condarc
1 |
|
问题
windows 不支持mamba init,只能用conda activate来切换环境
1 | 'gbk' codec can't decode byte 0xaa in position 347: illegal multibyte sequence |
-
解决方法
C:\Users\Achuan-2\mambaforge\Lib\site-packages\mamba\mamba_shell_init.py
1
2- 35 with open(file, "r") as fi:
+ 35 with open(file, "r",encoding="utf-8") as fi: