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