mihomo 的文档
推荐使用 [uv](https://docs.astral.sh/uv/) 管理 Python 和项目依赖。Windows:
winget install --id=astral-sh.uvmacOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh项目使用 Python 3.11,首次使用可执行:
uv python installuv 会自动创建并管理项目根目录下的 .venv。
uv sync如果访问 PyPI 较慢,可以临时设置 UV_DEFAULT_INDEX:
-
PowerShell
$env:UV_DEFAULT_INDEX = "https://pypi.tuna.tsinghua.edu.cn/simple"
-
bash/zsh
export UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple"
uv run mkdocs serveuv run mkdocs build如果你确实需要手动进入虚拟环境,可以使用:
-
PowerShell
.\.venv\Scripts\Activate.ps1
-
bash/zsh
source .venv/bin/activate
退出虚拟环境:
deactivate