训练网络的时候遇到了如下错误:

raise RuntimeError("Ninja is required to load C++ extensions")

Google了一圈发现在Windows上的大部分解决方案是执行:

pip install ninja

但是在虚拟环境中这么做了之后仍然报相同错误。思考良久之后突然灵光乍现,主要原因应该是我把一个项目嵌入到了diffusers(用于训练扩散模型的网络框架)中,报错位置的代码极有可能是找不到当前虚拟环境中的ninjia依赖,但是也不影响我的训练;因此只需要在base环境中安装ninjia就好了。经过尝试果然是这样。

GitHub 加速计划 / ni / ninja
5
0
下载
a small build system with a focus on speed
最近提交(Master分支:16 天前 )
47ed2d24 Bump actions/checkout from 4 to 5 7 天前
2e719411 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> 17 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐