Windows 手动安装

Reference: https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html#manual-installation

  1. 前往: https://github.com/mamba-org/micromamba-releases/releases/latest
  2. 手动下载二进制文件: micromamba-win-64.exe 改名 micromamba.exe
  3. 将二进制文件放入用户程序文件夹: 比如,C:\UserProgram\bin 并加入环境变量
  4. 查看帮助:
    1
    .\micromamba.exe --help
  5. 使用:
    1. 临时注册使用:
      1
      2
      $Env:MAMBA_ROOT_PREFIX="C:\UserProgram\Mamba"
      .\micromamba.exe shell hook -s powershell | Out-String | Invoke-Expression
    2. 持久注册到 profile.ps1
      1
      .\micromamba.exe shell init -s powershell -r C:\UserProgram\Mamba
  6. 配置镜像: C:\UserProgram\Mamba\.mambarc
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    channels:
    - defaults
    show_channel_urls: true
    default_channels:
    - https://mirror.nju.edu.cn/anaconda/pkgs/main
    - https://mirror.nju.edu.cn/anaconda/pkgs/r
    - https://mirror.nju.edu.cn/anaconda/pkgs/msys2
    custom_channels:
    conda-forge: https://mirror.nju.edu.cn/anaconda/cloud
    pytorch: https://mirror.nju.edu.cn/anaconda/cloud

解决 python 指令跳转应用商店的问题:

  1. 前往 设置 -> 应用 -> 高级应用设置 -> 应用执行别民
  2. 关闭 应用安装程序(python.exe)

示例:

创建一个 Python 3.12 环境

1
2
3
4
5
6
micromamba create -n py312
micromamba activate py312
micromamba install python=3.12
python --version
micromamba deactivate
micromamba remove -n py312 --all