raise RuntimeError(“Ninja is required to load C++ extensions“)问题的一种解决方案
ninja
a small build system with a focus on speed
项目地址:https://gitcode.com/gh_mirrors/ni/ninja

·
训练网络的时候遇到了如下错误:
raise RuntimeError("Ninja is required to load C++ extensions")
Google了一圈发现在Windows上的大部分解决方案是执行:
pip install ninja
但是在虚拟环境中这么做了之后仍然报相同错误。思考良久之后突然灵光乍现,主要原因应该是我把一个项目嵌入到了diffusers(用于训练扩散模型的网络框架)中,报错位置的代码极有可能是找不到当前虚拟环境中的ninjia依赖,但是也不影响我的训练;因此只需要在base环境中安装ninjia就好了。经过尝试果然是这样。




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 天前
更多推荐
所有评论(0)