Open mlcatinit opened 1 year ago
What is the output of the following command?
python -c "import kaldifeat; print(kaldifeat.__file__)"
(base) C:\Users\Fawaz Shaik\sherpa>python -c "import kaldifeat; print(kaldifeat.file)"
Traceback (most recent call last):
File "
How do i install it on PyTorch 1.13.1
How do i install it on PyTorch 1.13.1
pip uninstall kaldifeat
pip install --no-cache-dir kaldifeat
tried and got an error
logs:
(base) C:\Users\Fawaz Shaik\sherpa>pip install --no-cache-dir kaldifeat Collecting kaldifeat Downloading kaldifeat-1.24.tar.gz (467 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 467.9/467.9 kB 2.7 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Building wheels for collected packages: kaldifeat Building wheel for kaldifeat (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [67 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\fbank.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\mfcc.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\offline_feature.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\online_feature.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\plp.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\spectrogram.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat__init__.py -> build\lib.win-amd64-cpython-310\kaldifeat running build_ext Setting PYTHON_EXECUTABLE to C:\Users\Fawaz Shaik\anaconda3\python.exe build command is:
cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=C:\Users\Fawaz Shaik\anaconda3\python.exe -Dkaldifeat_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=C:\Users\Fawaz Shaik\AppData\Local\Temp\pip-install-rgv307yp\kaldifeat_9557886288bd4ad0aa5b62f62eb12d47\build\lib.win-amd64-cpython-310/kaldifeat -B build\temp.win-amd64-cpython-310\Release -S C:\Users\Fawaz Shaik\AppData\Local\Temp\pip-install-rgv307yp\kaldifeat_9557886288bd4ad0aa5b62f62eb12d47
cmake --build build\temp.win-amd64-cpython-310\Release --target _kaldifeat --config Release -- -m
cmake --build build\temp.win-amd64-cpython-310\Release --target install --config Release -- -m
CMake Error: The source directory "C:/Users/Fawaz Shaik/AppData/Local/Temp/pip-install-rgv307yp/kaldifeat_9557886288bd4ad0aa5b62f62eb12d47/Shaik/AppData/Local/Temp/pip-install-rgv307yp/kaldifeat_9557886288bd4ad0aa5b62f62eb12d47" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Fawaz Shaik\AppData\Local\Temp\pip-install-rgv307yp\kaldifeat_9557886288bd4ad0aa5b62f62eb12d47\setup.py", line 32, in <module>
setuptools.setup(
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 325, in run
self.run_command("build")
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
self.build_extensions()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 468, in build_extensions
self._build_extensions_serial()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 494, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\Fawaz Shaik\AppData\Local\Temp\pip-install-rgv307yp\kaldifeat_9557886288bd4ad0aa5b62f62eb12d47\cmake\cmake_extension.py", line 90, in build_extension
raise Exception("Failed to configure kaldifeat")
Exception: Failed to configure kaldifeat
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for kaldifeat Running setup.py clean for kaldifeat Failed to build kaldifeat Installing collected packages: kaldifeat Running setup.py install for kaldifeat ... error error: subprocess-exited-with-error
× Running setup.py install for kaldifeat did not run successfully. │ exit code: 1 ╰─> [71 lines of output] running install C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\fbank.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\mfcc.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\offline_feature.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\online_feature.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\plp.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\spectrogram.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat__init__.py -> build\lib.win-amd64-cpython-310\kaldifeat running build_ext Setting PYTHON_EXECUTABLE to C:\Users\Fawaz Shaik\anaconda3\python.exe build command is:
cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=C:\Users\Fawaz Shaik\anaconda3\python.exe -Dkaldifeat_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=C:\Users\Fawaz Shaik\AppData\Local\Temp\pip-install-rgv307yp\kaldifeat_9557886288bd4ad0aa5b62f62eb12d47\build\lib.win-amd64-cpython-310/kaldifeat -B build\temp.win-amd64-cpython-310\Release -S C:\Users\Fawaz Shaik\AppData\Local\Temp\pip-install-rgv307yp\kaldifeat_9557886288bd4ad0aa5b62f62eb12d47
cmake --build build\temp.win-amd64-cpython-310\Release --target _kaldifeat --config Release -- -m
cmake --build build\temp.win-amd64-cpython-310\Release --target install --config Release -- -m
CMake Error: The source directory "C:/Users/Fawaz Shaik/AppData/Local/Temp/pip-install-rgv307yp/kaldifeat_9557886288bd4ad0aa5b62f62eb12d47/Shaik/AppData/Local/Temp/pip-install-rgv307yp/kaldifeat_9557886288bd4ad0aa5b62f62eb12d47" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Fawaz Shaik\AppData\Local\Temp\pip-install-rgv307yp\kaldifeat_9557886288bd4ad0aa5b62f62eb12d47\setup.py", line 32, in <module>
setuptools.setup(
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\command\install.py", line 68, in run
return orig.install.run(self)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\command\install.py", line 698, in run
self.run_command('build')
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
self.build_extensions()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 468, in build_extensions
self._build_extensions_serial()
File "C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 494, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\Fawaz Shaik\AppData\Local\Temp\pip-install-rgv307yp\kaldifeat_9557886288bd4ad0aa5b62f62eb12d47\cmake\cmake_extension.py", line 90, in build_extension
raise Exception("Failed to configure kaldifeat")
Exception: Failed to configure kaldifeat
[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. ╰─> kaldifeat
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
Could you try
git clone https://github.com/csukuangfj/kaldifeat
cd kaldifeat
python3 setup.py install
i get this error
(base) C:\Users\Fawaz Shaik\sherpa>cd kaldifeat
(base) C:\Users\Fawaz Shaik\sherpa\kaldifeat>python3 setup.py install Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
(base) C:\Users\Fawaz Shaik\sherpa\kaldifeat>python setup.py install running install C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( C:\Users\Fawaz Shaik\anaconda3\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( running bdist_egg running egg_info creating kaldifeat.egg-info writing kaldifeat.egg-info\PKG-INFO writing dependency_links to kaldifeat.egg-info\dependency_links.txt writing top-level names to kaldifeat.egg-info\top_level.txt writing manifest file 'kaldifeat.egg-info\SOURCES.txt' reading manifest file 'kaldifeat.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'kaldifeat.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\fbank.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\mfcc.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\offline_feature.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\online_feature.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\plp.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat\spectrogram.py -> build\lib.win-amd64-cpython-310\kaldifeat copying kaldifeat\python\kaldifeat__init__.py -> build\lib.win-amd64-cpython-310\kaldifeat running build_ext Setting PYTHON_EXECUTABLE to C:\Users\Fawaz Shaik\anaconda3\python.exe build command is:
cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=C:\Users\Fawaz Shaik\anaconda3\python.exe -Dkaldifeat_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=C:\Users\Fawaz Shaik\sherpa\kaldifeat\build\lib.win-amd64-cpython-310/kaldifeat -B build\temp.win-amd64-cpython-310\Release -S C:\Users\Fawaz Shaik\sherpa\kaldifeat
cmake --build build\temp.win-amd64-cpython-310\Release --target _kaldifeat --config Release -- -m
cmake --build build\temp.win-amd64-cpython-310\Release --target install --config Release -- -m
CMake Error: The source directory "C:/Users/Fawaz Shaik/sherpa/kaldifeat/Shaik/sherpa/kaldifeat" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Traceback (most recent call last):
File "C:\Users\Fawaz Shaik\sherpa\kaldifeat\setup.py", line 32, in
Please replace
python3 setup.py install
with
python setup.py install
By the way, I suggest that you switch to http://github.com/k2-fsa/sherpa-ncnn or https://github.com/k2-fsa/sherpa-onnx if you are not going to use Nivida GPUs.
It is way simpler than k2-fsa/sherpa to setup the environment.
even with python setup.py install i am getting same error
I will check out out ncnn and onnx. Thanks a lot!
Hello I installed all the requirements .txt in sherpa but when I am trying to run setup.py I get errors
when running requirements.txt install i get: (base) C:\Users\Fawaz Shaik\sherpa>pip install -r ./requirements.txt Requirement already satisfied: websockets in c:\users\fawaz shaik\anaconda3\lib\site-packages (from -r ./requirements.txt (line 1)) (11.0.3) Requirement already satisfied: kaldifeat in c:\users\fawaz shaik\anaconda3\lib\site-packages (from -r ./requirements.txt (line 2)) (1.23) Requirement already satisfied: sentencepiece>=0.1.96 in c:\users\fawaz shaik\anaconda3\lib\site-packages (from -r ./requirements.txt (line 3)) (0.1.99) Requirement already satisfied: numpy in c:\users\fawaz shaik\anaconda3\lib\site-packages (from -r ./requirements.txt (line 4)) (1.23.5)
but when i try installing setup.py i get: (base) C:\Users\Fawaz Shaik\sherpa>python setup.py install Please install kaldifeat first. See https://k2-fsa.github.io/sherpa/python/installation/index.html for details.