「Python.h: No such file or directory」対処法
centos stream 8
python 3.9
発生
pip でpyopenjtalkをインストールしたときに発生
...
pyopenjtalk/openjtalk.cpp:6:10: fatal error: Python.h: No such file or directory
6 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for pyopenjtalk
修正
yumの場合
yum install python3-devel
aptの場合
apt install python3-dev