「Python.h: No such file or directory」対処法

  • URLをコピーしました!

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
よかったらシェアしてね!
  • URLをコピーしました!

この記事を書いた人

コメント

コメントする

CAPTCHA


目次