pip安装pyopenjtalk报错cmake找不到的解决办法

pip安装pyopenjtalk遇到如下2个报错:

raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘…’, ‘-DHTS_ENGINE_INCLUDE_DIR=.’, ‘-DHTS_ENGINE_LIB=dummy’]’ returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘cmake’
[end of output]

该问题是因为宿主机没有cmake,使用apt安装即可:

sudo apt install cmake

然后在venv虚拟环境中再次尝试安装pyopenjtalk

pip install pyopenjtalk

若还报错:

把venv里的cmake先卸载掉

pip uninstall cmake
error: subprocess-exited-with-error × Building wheel for pyopenjtalk (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [74 lines of output] D:\usertemp\pip-build-env-l81poy77\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated !! ******************************************************************************** Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0). By 2026-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! corresp(dist, value, root_dir) D:\usertemp\pip-build-env-l81poy77\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: MIT License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! dist._finalize_license_expression() D:\usertemp\pip-build-env-l81poy77\overlay\Lib\site-packages\setuptools\dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: MIT License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() CMake is in the system path. Version: cmake version 4.0.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). running bdist_wheel running build running build_py creating build\lib.win-amd64-cpython-311\pyopenjtalk copying pyopenjtalk\utils.py -> build\lib.win-amd64-cpython-311\pyopenjtalk copying pyopenjtalk\version.py -> build\lib.win-amd64-cpython-311\pyopenjtalk copying pyopenjtalk\__init__.py -> build\lib.win-amd64-cpython-311\pyopenjtalk running egg_info writing pyopenjtalk.egg-info\PKG-INFO writing dependency_links to pyopenjtalk.egg-info\dependency_links.txt writing requirements to pyopenjtalk.egg-info\requires.txt writing top-level names to pyopenjtalk.egg-info\top_level.txt reading manifest file 'pyopenjtalk.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files found matching '.gitignore' warning: no previously-included files found matching '.gitmodules' warning: no previously-included files found matching '.travis.yml' warning: no previously-included files found matching 'tox.ini' no previously-included directories found matching '.github\*' no previously-included directories found matching 'docs\**' adding license file 'LICENSE.md' writing manifest file 'pyopenjtalk.egg-info\SOURCES.txt' creating build\lib.win-amd64-cpython-311\pyopenjtalk\htsvoice copying pyopenjtalk\htsvoice\LICENSE_mei_normal.htsvoice -> build\lib.win-amd64-cpython-311\pyopenjtalk\htsvoice copying pyopenjtalk\htsvoice\README.md -> build\lib.win-amd64-cpython-311\pyopenjtalk\htsvoice copying pyopenjtalk\htsvoice\mei_normal.htsvoice -> build\lib.win-amd64-cpython-311\pyopenjtalk\htsvoice running build_ext Compiling pyopenjtalk\openjtalk.pyx because it changed. [1/1] Cythonizing pyopenjtalk\openjtalk.pyx building 'pyopenjtalk.openjtalk' extension error: Unable to find a compatible Visual Studio installation. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyopenjtalk Failed to build pyopenjtalk ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyopenjtalk)
最新发布
06-03
D:\miniconda3\envs\pyopenjtalk_test_env\lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated !! ******************************************************************************** Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0). By 2026-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! corresp(dist, value, root_dir) D:\miniconda3\envs\pyopenjtalk_test_env\lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: MIT License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! dist._finalize_license_expression() D:\miniconda3\envs\pyopenjtalk_test_env\lib\site-packages\setuptools\dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: MIT License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running bdist_wheel running build running build_py creating build\lib.win32-cpython-39\pyopenjtalk copying pyopenjtalk\utils.py -> build\lib.win32-cpython-39\pyopenjtalk copying pyopenjtalk\version.py -> build\lib.win32-cpython-39\pyopenjtalk copying pyopenjtalk\__init__.py -> build\lib.win32-cpython-39\pyopenjtalk running egg_info writing pyopenjtalk.egg-info\PKG-INFO writing dependency_links to pyopenjtalk.egg-info\dependency_links.txt writing requirements to pyopenjtalk.egg-info\requires.txt writing top-level names to pyopenjtalk.egg-info\top_level.txt reading manifest file 'pyopenjtalk.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files found matching '.gitignore' warning: no previously-included files found matching '.gitmodules' warning: no previously-included files found matching '.travis.yml' warning: no previously-included files found matching 'tox.ini' no previously-included directories found matching '.github\*' no previously-included directories found matching 'docs\**' adding license file 'LICENSE.md' writing manifest file 'pyopenjtalk.egg-info\SOURCES.txt' creating build\lib.win32-cpython-39\pyopenjtalk\htsvoice copying pyopenjtalk\htsvoice\LICENSE_mei_normal.htsvoice -> build\lib.win32-cpython-39\pyopenjtalk\htsvoice copying pyopenjtalk\htsvoice\README.md -> build\lib.win32-cpython-39\pyopenjtalk\htsvoice copying pyopenjtalk\htsvoice\mei_normal.htsvoice -> build\lib.win32-cpython-39\pyopenjtalk\htsvoice running build_ext Compiling pyopenjtalk\openjtalk.pyx because it changed. [1/1] Cythonizing pyopenjtalk\openjtalk.pyx building 'pyopenjtalk.openjtalk' extension error: Unable to find a compatible Visual Studio installation.
06-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

木法星人

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值