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

猜你喜欢

转载自blog.csdn.net/qq_42183962/article/details/132394333