Open Minspeech opened 1 year ago
这个报错信息不完整,只能看到是安装ctcdecode出错了。能否把完整错误报告发一下
Looking in indexes: https://pypi.doubanio.com/simple/, https://pypi.ngc.nvidia.com Processing ./src/ctcdecode Preparing metadata (setup.py) ... done Building wheels for collected packages: ctcdecode Building wheel for ctcdecode (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [131 lines of output]
/work2/ljy/Cat_new/CAT/src/ctcdecode/setup.py:37: UserWarning: File third_party/kenlm/setup.py
does not appear to be present. Did you forget git submodule update
?
warnings.warn("File {}
does not appear to be present. Did you forget git submodule update
?".format(file))
/work2/ljy/Cat_new/CAT/src/ctcdecode/setup.py:37: UserWarning: File third_party/ThreadPool/ThreadPool.h
does not appear to be present. Did you forget git submodule update
?
warnings.warn("File {}
does not appear to be present. Did you forget git submodule update
?".format(file))
/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/extension.py:134: UserWarning: Unknown Extension options: 'package', 'with_cuda'
warnings.warn(msg)
…………
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/work2/ljy/Cat_new/CAT/src/ctcdecode/setup.py", line 132, in <module>
setup(
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 325, in run
self.run_command("build")
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
self.build_extensions()
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensions
build_ext.build_extensions(self)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 468, in build_extensions
self._build_extensions_serial()
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 494, in _build_extensions_serial
self.build_extension(ext)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
_build_ext.build_extension(self, ext)
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 549, in build_extension
objects = self.compiler.compile(
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 530, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1355, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/work/anaconda/envs/cat/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ctcdecode Running setup.py clean for ctcdecode Failed to build ctcdecode ……………… 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. ╰─> ctcdecode
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. failed to install cat.
看起来是第一次在获取ctcdecode包的时候没有完成。
你可以尝试手动切换到安装目录 src/ctcdecode/ 运行
git submodule init && git submodule update pip install -e .
小提示: ctcdecode安装过程中需要连接github
谢谢,试了, 现在报错是这样的 collect2: error: ld returned 1 exit status make[2]: [lm/builder/CMakeFiles/count_ngrams.dir/build.make:108: bin/count_ngrams] Error 1 make[1]: [CMakeFiles/Makefile2:483: lm/builder/CMakeFiles/count_ngrams.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 If you meet building error and have no idea why it is raised, ... please first confirm all requirements are installed. See ... https://github.com/kpu/kenlm/blob/master/BUILDING failed to install cat.
这个链接的BUILDING 的命令是在哪个目录下执行?
可能是kenlm的依赖缺失,在任意目录下执行(需要root权限)
# Debian/Ubuntu
sudo apt install build-essential cmake libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libeigen3-dev zlib1g-dev libbz2-dev liblzma-dev
没有root权限欸
yum install build-essential cmake libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libeigen3-dev zlib1g-dev libbz2-dev liblzma-dev Failed to set locale, defaulting to C Loaded plugins: fastestmirror, product-id, search-disabled-repos Loading mirror speeds from cached hostfile
Fetching submodule third_party/ThreadPool Fetching submodule third_party/kenlm Already up-to-date. Looking in indexes: https://pypi.doubanio.com/simple/, https://pypi.ngc.nvidia.com Processing ./src/ctcdecode Preparing metadata (setup.py) ... done Building wheels for collected packages: ctcdecode Building wheel for ctcdecode (setup.py) ... done Created wheel for ctcdecode: filename=ctcdecode-1.0.3-cp38-cp38-linux_x86_64.whl size=1352131 sha256=6a167e76af540ec068e807119b098cfc565039fb940ea332b7914c125cf1d866 Stored in directory: /tmp/pip-ephem-wheel-cache-1mwict0l/wheels/43/04/ec/e9912440442747ed299342c50b2b048b458a7d301b50f0f111 Successfully built ctcdecode Installing collected packages: ctcdecode Attempting uninstall: ctcdecode Found existing installation: ctcdecode 1.0.3 Uninstalling ctcdecode-1.0.3: Successfully uninstalled ctcdecode-1.0.3 Successfully installed ctcdecode-1.0.3 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://pypi.doubanio.com/simple/, https://pypi.ngc.nvidia.com Obtaining kenlm from git+https://github.com/kpu/kenlm.git#egg=kenlm Updating ./src/kenlm clone Running command git fetch -q Running command git reset --hard -q bcd4af619a2fa45f5876d8855f7876cc09f663af Preparing metadata (setup.py) ... done Installing collected packages: kenlm Attempting uninstall: kenlm Found existing installation: kenlm 0.0.0 Uninstalling kenlm-0.0.0: Successfully uninstalled kenlm-0.0.0 Running setup.py develop for kenlm Successfully installed kenlm-0.0.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv -- Could NOT find Eigen3 (missing: Eigen3_DIR) -- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) -- Could NOT find LibLZMA (missing: LIBLZMA_LIBRARY LIBLZMA_INCLUDE_DIR LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) -- Configuring done -- Generating done -- Build files have been written to: /work2/ljy/CAT/src/kenlm/build Consolidate compiler generated dependencies of target kenlm_util [ 38%] Built target kenlm_util Consolidate compiler generated dependencies of target probing_hash_table_benchmark Consolidate compiler generated dependencies of target kenlm_filter Consolidate compiler generated dependencies of target kenlm [ 41%] Built target probing_hash_table_benchmark [ 46%] Built target kenlm_filter [ 71%] Built target kenlm Consolidate compiler generated dependencies of target build_binary Consolidate compiler generated dependencies of target filter Consolidate compiler generated dependencies of target phrase_table_vocab Consolidate compiler generated dependencies of target query Consolidate compiler generated dependencies of target fragment Consolidate compiler generated dependencies of target kenlm_benchmark Consolidate compiler generated dependencies of target kenlm_builder [ 73%] Built target build_binary [ 76%] Built target phrase_table_vocab [ 78%] Built target query [ 81%] Built target fragment [ 83%] Built target filter [ 85%] Linking CXX executable ../bin/kenlm_benchmark [ 93%] Built target kenlm_builder Consolidate compiler generated dependencies of target count_ngrams Consolidate compiler generated dependencies of target lmplz [ 95%] Linking CXX executable ../../bin/count_ngrams [ 96%] Linking CXX executable ../../bin/lmplz CMakeFiles/kenlm_benchmark.dir/kenlm_benchmark_main.cc.o: ………… collect2: error: ld returned 1 exit status make[2]: [lm/builder/CMakeFiles/lmplz.dir/build.make:108: bin/lmplz] Error 1 make[1]: [CMakeFiles/Makefile2:455: lm/builder/CMakeFiles/lmplz.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 If you meet building error and have no idea why it is raised, ... please first confirm all requirements are installed. See ... https://github.com/kpu/kenlm/blob/master/BUILDING failed to install cat.
大佬救救,报错点: Building wheel for ctcdecode (setup.py) ... error error: subprocess-exited-with-error ERROR: Failed building wheel for ctcdecode error: legacy-install-failure