You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows 11安装Spleeter时出现distutils.msvccompiler模块缺失错误的解决求助

Windows 11安装Spleeter时出现distutils.msvccompiler模块缺失错误的解决求助

我第一次在Windows 11 Home 64位系统上安装Spleeter,当前环境是Python 3.12.0、NumPy 2.1.2和FFmpeg 2024-12-16。但运行pip install spleeter时,终端抛出了关于distutils.msvccompiler模块缺失的错误,导致安装失败。有没有解决办法或者替代方案?另外如果有能优化这个问题的建议也欢迎提出,非常感谢!

安装时的错误日志

Defaulting to user installation because normal site-packages is not writeable
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/spleeter/
Collecting spleeter
  Using cached spleeter-2.1.0-py3-none-any.whl.metadata (10 kB)
Collecting ffmpeg-python==0.2.0 (from spleeter)
  Using cached ffmpeg_python-0.2.0-py3-none-any.whl.metadata (1.7 kB)
Collecting httpx<0.17.0,>=0.16.1 (from httpx[http2]<0.17.0,>=0.16.1->spleeter)
  Using cached httpx-0.16.1-py3-none-any.whl.metadata (38 kB)
Collecting librosa==0.8.0 (from spleeter)
  Using cached librosa-0.8.0.tar.gz (183 kB)
  Preparing metadata (setup.py) ... done
Collecting norbert==0.2.1 (from spleeter)
  Using cached norbert-0.2.1-py2.py3-none-any.whl.metadata (3.8 kB)
Collecting numpy<1.19.0,>=1.16.0 (from spleeter)
  Using cached numpy-1.18.5.zip (5.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      Running from numpy source directory.
      <string>:461: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      Traceback (most recent call last):
        File "C:\Users\user\AppData\Roaming\Python\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\user\AppData\Roaming\Python\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\user\AppData\Roaming\Python\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\user\AppData\Local\Temp\pip-build-env-jh79_vav\overlay\Lib\site-packages\setuptools\build_meta.py", line 377, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "C:\Users\user\AppData\Local\Temp\pip-build-env-jh79_vav\overlay\Lib\site-packages\setuptools\build_meta.py", line 522, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\user\AppData\Local\Temp\pip-build-env-jh79_vav\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 488, in <module>
        File "<string>", line 465, in setup_package
        File "C:\Users\user\AppData\Local\Temp\pip-install-wz5wh6ix\numpy_c70a3ebc725446b397c2c2fb270c9aff\numpy\distutils\core.py", line 26, in <module>
          from numpy.distutils.command import config, config_compiler, \
        File "C:\Users\user\AppData\Local\Temp\pip-install-wz5wh6ix\numpy_c70a3ebc725446b397c2c2fb270c9aff\numpy\distutils\command\config.py", line 20, in <module>
          from numpy.distutils.mingw32ccompiler import generate_manifest
        File "C:\Users\user\AppData\Local\Temp\pip-install-wz5wh6ix\numpy_c70a3ebc725446b397c2c2fb270c9aff\numpy\distutils\mingw32ccompiler.py", line 34, in <module>
          from distutils.msvccompiler import get_build_version as get_build_msvc_version
      ModuleNotFoundError: No module named 'distutils.msvccompiler'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

我的操作与期望

  • 我尝试的操作:直接运行pip install spleeter进行安装
  • 遇到的问题:安装在构建numpy等依赖时失败,提示distutils.msvccompiler模块缺失
  • 我的期望:能顺利安装Spleeter并使用它完成音频分离任务

备注:内容来源于stack exchange,提问作者Tested First

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.14 18:18:06