安装NNUNet时出现Could not build wheels错误,求解决方案
解决NNUNet安装时wheel构建失败问题
问题详情
安装NNUNet时触发以下错误:
ERROR: Could not build wheels for nnunet, which is required to install pyproject.toml-based projects
附带的错误输出提示:
error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [444 lines of output] C:\Users\chris\anaconda3\envs\nnunet\lib\site-packages\setuptools\dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options !! ******************************************************************************** Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead. This deprecation is overdue, please update your project and remove deprecated calls to avoid build errors in the future. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details. ******************************************************************************** !!
解决方法
问题本质是新版本setuptools不再兼容NNUNet旧版setup.py中使用的description-file参数格式,按以下步骤处理:
- 首先降级setuptools到兼容版本:
pip install setuptools==65.5.0 - 然后重新安装NNUNet:
pip install nnunet - 若你是从本地源码包安装,进入NNUNet项目根目录后执行:
pip install -e .
内容的提问来源于stack exchange,提问作者Rayster
相关产品推荐
相关产品推荐

