k2-fsa/sherpa-ncnn

请问我在pip install sherpa-ncnn时出现了一下问题是什么原因呀?

yy123hd opened this issue · 21 comments

Defaulting to user installation because normal site-packages is not writeable
Collecting sherpa-ncnn
Using cached sherpa-ncnn-2.1.7.tar.gz (78 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\jun\appdata\roaming\python\python39\site-packages (from sherpa-ncnn) (1.26.3)
Building wheels for collected packages: sherpa-ncnn
Building wheel for sherpa-ncnn (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [65 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\sherpa_ncnn
copying sherpa-ncnn\python\sherpa_ncnn\recognizer.py -> build\lib.win-amd64-cpython-39\sherpa_ncnn
copying sherpa-ncnn\python\sherpa_ncnn_init_.py -> build\lib.win-amd64-cpython-39\sherpa_ncnn
running build_ext
Setting PYTHON_EXECUTABLE to D:\Anaconda3\python.exe
build command is:

           cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=D:\Anaconda3\python.exe -DCMAKE_INSTALL_PREFIX=C:\Users\JUN\AppData\Local\Temp\pip-i

nstall-68su60kj\sherpa-ncnn_653f2e764cf846c182b265c4fef5c5bf\build\lib.win-amd64-cpython-39\sherpa_ncnn -DBUILD_SHARED_LIBS=ON -DSHERPA_NCNN_ENABLE_PY
THON=ON -DSHERPA_NCNN_ENABLE_PORTAUDIO=OFF -B build\temp.win-amd64-cpython-39\Release -S C:\Users\JUN\AppData\Local\Temp\pip-install-68su60kj\sherpa-n
cnn_653f2e764cf846c182b265c4fef5c5bf
cmake --build build\temp.win-amd64-cpython-39\Release --target install --config Release -- -m

  'cmake' 不是内部或外部命令,也不是可运行的程序
  或批处理文件。
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\JUN\AppData\Local\Temp\pip-install-68su60kj\sherpa-ncnn_653f2e764cf846c182b265c4fef5c5bf\setup.py", line 42, in <module>
      setuptools.setup(
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "D:\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\command\build_ext.py", line 89, in run
      _build_ext.run(self)
    File "D:\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
      self.build_extensions()
    File "D:\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
      _build_ext.build_ext.build_extensions(self)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_ser

ial
self.build_extension(ext)
File "C:\Users\JUN\AppData\Local\Temp\pip-install-68su60kj\sherpa-ncnn_653f2e764cf846c182b265c4fef5c5bf\cmake\cmake_extension.py", line 93, in b
uild_extension
raise Exception("Failed to configure sherpa")
Exception: Failed to configure sherpa
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sherpa-ncnn
Running setup.py clean for sherpa-ncnn
Failed to build sherpa-ncnn
Installing collected packages: sherpa-ncnn
Running setup.py install for sherpa-ncnn ... error
error: subprocess-exited-with-error

× Running setup.py install for sherpa-ncnn did not run successfully.
│ exit code: 1
╰─> [80 lines of output]
running install
C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is depr
ecated.
!!

          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer or other
          standards-based tools.
 
          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************
 
  !!
    self.initialize_options()
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-cpython-39
  creating build\lib.win-amd64-cpython-39\sherpa_ncnn
  copying sherpa-ncnn\python\sherpa_ncnn\recognizer.py -> build\lib.win-amd64-cpython-39\sherpa_ncnn
  copying sherpa-ncnn\python\sherpa_ncnn\__init__.py -> build\lib.win-amd64-cpython-39\sherpa_ncnn
  running build_ext
  Setting PYTHON_EXECUTABLE to D:\Anaconda3\python.exe
  build command is:
 
           cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=D:\Anaconda3\python.exe -DCMAKE_INSTALL_PREFIX=C:\Users\JUN\AppData\Local\Temp\pip-i

nstall-68su60kj\sherpa-ncnn_653f2e764cf846c182b265c4fef5c5bf\build\lib.win-amd64-cpython-39\sherpa_ncnn -DBUILD_SHARED_LIBS=ON -DSHERPA_NCNN_ENABLE_PY
THON=ON -DSHERPA_NCNN_ENABLE_PORTAUDIO=OFF -B build\temp.win-amd64-cpython-39\Release -S C:\Users\JUN\AppData\Local\Temp\pip-install-68su60kj\sherpa-n
cnn_653f2e764cf846c182b265c4fef5c5bf
cmake --build build\temp.win-amd64-cpython-39\Release --target install --config Release -- -m

  'cmake' 不是内部或外部命令,也不是可运行的程序
  或批处理文件。
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\JUN\AppData\Local\Temp\pip-install-68su60kj\sherpa-ncnn_653f2e764cf846c182b265c4fef5c5bf\setup.py", line 42, in <module>
      setuptools.setup(
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\command\install.py", line 79, in run
      return orig.install.run(self)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\install.py", line 697, in run
      self.run_command('build')
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\command\build_ext.py", line 89, in run
      _build_ext.run(self)
    File "D:\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
      self.build_extensions()
      raise Exception("Failed to configure sherpa")
  Exception: Failed to configure sherpa
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> sherpa-ncnn

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

先运行

pip install cmake

然后继续

已经运行了

还报错么

对的,还是报错

报什么错误呢

Defaulting to user installation because normal site-packages is not writeable
Collecting sherpa-ncnn
Using cached sherpa-ncnn-2.1.7.tar.gz (78 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\jun\appdata\roaming\python\python39\site-packages (from sherpa-ncnn) (1.26.3)
Building wheels for collected packages: sherpa-ncnn
Building wheel for sherpa-ncnn (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [65 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\sherpa_ncnn
copying sherpa-ncnn\python\sherpa_ncnn\recognizer.py -> build\lib.win-amd64-cpython-39\sherpa_ncnn
copying sherpa-ncnn\python\sherpa_ncnn_init_.py -> build\lib.win-amd64-cpython-39\sherpa_ncnn
running build_ext
Setting PYTHON_EXECUTABLE to D:\Anaconda3\python.exe
build command is:

           cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=D:\Anaconda3\python.exe -DCMAKE_INSTALL_PREFIX=C:\Users\JUN\AppData\Local\Temp\pip-i

nstall-985i10gf\sherpa-ncnn_ba8b4b28c1e341d5b0c5c9024ca193fc\build\lib.win-amd64-cpython-39\sherpa_ncnn -DBUILD_SHARED_LIBS=ON -DSHERPA_NCNN_ENABLE_PY
THON=ON -DSHERPA_NCNN_ENABLE_PORTAUDIO=OFF -B build\temp.win-amd64-cpython-39\Release -S C:\Users\JUN\AppData\Local\Temp\pip-install-985i10gf\sherpa-n
cnn_ba8b4b28c1e341d5b0c5c9024ca193fc
cmake --build build\temp.win-amd64-cpython-39\Release --target install --config Release -- -m

  'cmake' 不是内部或外部命令,也不是可运行的程序
  或批处理文件。
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\JUN\AppData\Local\Temp\pip-install-985i10gf\sherpa-ncnn_ba8b4b28c1e341d5b0c5c9024ca193fc\setup.py", line 42, in <module>
      setuptools.setup(
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "D:\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\command\build_ext.py", line 89, in run
      _build_ext.run(self)
    File "D:\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
      self.build_extensions()
    File "D:\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
      _build_ext.build_ext.build_extensions(self)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions     
      self._build_extensions_serial()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_ser

ial
self.build_extension(ext)
File "C:\Users\JUN\AppData\Local\Temp\pip-install-985i10gf\sherpa-ncnn_ba8b4b28c1e341d5b0c5c9024ca193fc\cmake\cmake_extension.py", line 93, in b
uild_extension
raise Exception("Failed to configure sherpa")
Exception: Failed to configure sherpa
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sherpa-ncnn
Running setup.py clean for sherpa-ncnn
Failed to build sherpa-ncnn
Installing collected packages: sherpa-ncnn
Running setup.py install for sherpa-ncnn ... error
error: subprocess-exited-with-error

× Running setup.py install for sherpa-ncnn did not run successfully.
│ exit code: 1
╰─> [80 lines of output]
running install
C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is depr
ecated.
!!

          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer or other
          standards-based tools.
 
          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************
 
  !!
    self.initialize_options()
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-cpython-39
  creating build\lib.win-amd64-cpython-39\sherpa_ncnn
  copying sherpa-ncnn\python\sherpa_ncnn\recognizer.py -> build\lib.win-amd64-cpython-39\sherpa_ncnn
  copying sherpa-ncnn\python\sherpa_ncnn\__init__.py -> build\lib.win-amd64-cpython-39\sherpa_ncnn
  running build_ext
  Setting PYTHON_EXECUTABLE to D:\Anaconda3\python.exe
  build command is:
 
           cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=D:\Anaconda3\python.exe -DCMAKE_INSTALL_PREFIX=C:\Users\JUN\AppData\Local\Temp\pip-i

nstall-985i10gf\sherpa-ncnn_ba8b4b28c1e341d5b0c5c9024ca193fc\build\lib.win-amd64-cpython-39\sherpa_ncnn -DBUILD_SHARED_LIBS=ON -DSHERPA_NCNN_ENABLE_PY
THON=ON -DSHERPA_NCNN_ENABLE_PORTAUDIO=OFF -B build\temp.win-amd64-cpython-39\Release -S C:\Users\JUN\AppData\Local\Temp\pip-install-985i10gf\sherpa-n
cnn_ba8b4b28c1e341d5b0c5c9024ca193fc
cmake --build build\temp.win-amd64-cpython-39\Release --target install --config Release -- -m

  'cmake' 不是内部或外部命令,也不是可运行的程序
  或批处理文件。
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\JUN\AppData\Local\Temp\pip-install-985i10gf\sherpa-ncnn_ba8b4b28c1e341d5b0c5c9024ca193fc\setup.py", line 42, in <module>
      setuptools.setup(
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\command\install.py", line 79, in run
      return orig.install.run(self)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\install.py", line 697, in run
      self.run_command('build')
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\dist.py", line 963, in run_command
      super().run_command(command)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\command\build_ext.py", line 89, in run
      _build_ext.run(self)
    File "D:\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
      self.build_extensions()
    File "D:\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
      _build_ext.build_ext.build_extensions(self)
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions     
      self._build_extensions_serial()
    File "C:\Users\JUN\AppData\Roaming\Python\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_ser

ial
self.build_extension(ext)
File "C:\Users\JUN\AppData\Local\Temp\pip-install-985i10gf\sherpa-ncnn_ba8b4b28c1e341d5b0c5c9024ca193fc\cmake\cmake_extension.py", line 93, in b
uild_extension
raise Exception("Failed to configure sherpa")
Exception: Failed to configure sherpa
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> sherpa-ncnn

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

和上面一样的错误

pip install cmake

这个命令的输出,请贴一下。

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: cmake in c:\users\jun\appdata\roaming\python\python39\site-packages (3.28.3)

cmake --version

这个有输出吗

最快的解决方法

pip install sherpa-ncnn==2.1.6


正在发布 2.1.7

pip install sherpa-ncnn==2.1.6 这个可以安装上了

请问 这个命令cmake --version在哪里执行可以查看版本?

请问 这个命令cmake --version在哪里执行可以查看版本?

在命令行执行。你的错误,是因为你没有安装 cmake

那为何pip install cmake 的输出显示的是上面那个输出呀?我试了 pip list 里面也有cmake 显示3.28.3

cmake --version

这个有输出吗

你这个跑了吗

现在可以跑

pip install -U sherpa-ncnn

如果还不行,就用

pip install -U --no-cache-dir sherpa-ncnn

这个会安装最新的 sherpa-ncnn, 即 2.1.7

cmake --version
这个有输出吗

你这个跑了吗

'cmake' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
显示这个

现在可以跑

pip install -U sherpa-ncnn

如果还不行,就用

pip install -U --no-cache-dir sherpa-ncnn

这个会安装最新的 sherpa-ncnn, 即 2.1.7

刚刚的pip install sherpa-ncnn==2.1.6 这个安装成功了

c:\users\jun\appdata\roaming\python\python39

如果你想解决的话,可以去上面的路径,找找有没有一个叫做 cmake.exe 的可执行程序。
如果不想花时间的话,你现在已经成功安装 sherpa-ncnn 了,可以使用了。

好的谢谢您