yfeng95 / DECA

DECA: Detailed Expression Capture and Animation (SIGGRAPH 2021)
Other
2.15k stars 425 forks source link

cannot import name '_nt_quote_args' from 'distutils.spawn' #122

Open sniperc96 opened 2 years ago

sniperc96 commented 2 years ago

Here are the errors reported

D:\Acaconda\envs\DECA\lib\site-packages\torch\utils\cpp_extension.py:270: UserWarning: Error checking compiler version for cl: 'utf-8' codec can't decode byte 0xd3 in position 0: invalid continuation byte
  warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error))
Traceback (most recent call last):
  File "demos/demo_reconstruct.py", line 126, in <module>
    main(parser.parse_args())
  File "demos/demo_reconstruct.py", line 45, in main
    deca = DECA(config = deca_cfg, device=device)
  File "D:\install package\study\DECA-master\decalib\deca.py", line 50, in __init__
    self._setup_renderer(self.cfg.model)
  File "D:\install package\study\DECA-master\decalib\deca.py", line 53, in _setup_renderer
    set_rasterizer(self.cfg.rasterizer_type)
  File "D:\install package\study\DECA-master\decalib\utils\renderer.py", line 41, in set_rasterizer
    extra_cuda_cflags = ['-std=c++14', '-ccbin=$$(which gcc-7)']) # cuda10.2 is not compatible with gcc9. Specify gcc 7
  File "D:\Acaconda\envs\DECA\lib\site-packages\torch\utils\cpp_extension.py", line 974, in load
    keep_intermediates=keep_intermediates)
  File "D:\Acaconda\envs\DECA\lib\site-packages\torch\utils\cpp_extension.py", line 1179, in _jit_compile
    with_cuda=with_cuda)
  File "D:\Acaconda\envs\DECA\lib\site-packages\torch\utils\cpp_extension.py", line 1272, in _write_ninja_file_and_build_library
    with_cuda=with_cuda)
  File "D:\Acaconda\envs\DECA\lib\site-packages\torch\utils\cpp_extension.py", line 1579, in _write_ninja_file_to_build_library
    from distutils.spawn import _nt_quote_args
ImportError: cannot import name '_nt_quote_args' from 'distutils.spawn' (D:\Acaconda\envs\DECA\lib\site-packages\setuptools\_distutils\spawn.py)

Can anyone tell me how to fix it? Thanks

monokuma-zhuo commented 2 years ago

It's a problem about latest setuptools.You can solve the problem by degrading the version of setuptools to 59.6 or lower more information

sniperc96 commented 2 years ago

It's a problem about latest setuptools.You can solve the problem by degrading the version of setuptools to 59.6 or lower more information

Thank you for the advice, it works! But now I have another problem

subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
......
......
ninja: build stopped: subcommand failed.

Have you encountered this problem?

monokuma-zhuo commented 2 years ago

Maybe this issue helps you. It works for me.

kpraneetv commented 1 month ago

Hey,

is this issue resolved?