赞
踩
File "/home/jankin/miniconda3/envs/env_GCFSR/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1893, in _run_ninja_build subprocess.run( File "/home/jankin/miniconda3/envs/env_GCFSR/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: ... ...(省略部分) ... /usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’ /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’: 530 | operator=(_Functor&& __f) | /usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’ ninja: build stopped: subcommand failed.
观察上述问题中发现,实际报错提示为:
subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1.
1、根据错误提示找到cpp_extension.py文件,提示如下:
home/jankin/miniconda3/envs/env_GCFSR/lib/python3.8/site-packages/torch/utils/cpp_extension.py
2、在 cpp_extension.py文件中,
将[‘ninja’, ‘-v’] 修改为 [‘ninja’, ‘–version’]
3、重新运行,上述问题得到解决
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。