opencv-3.4.2をソースからインストール中に以下のようなエラーが吐き出された。 [ccNe lang=”bash” theme=”solarized-light”]/root/opencv-3.4.2/modules/python/src2/cv2.cpp:30:10: fatal error: pyopencv_generated_include.h: No such file or directory #include “pyopencv_generated_include.h”[/ccNe]
このサイトに上述のエラーの解決方法が以下のコードを実行することであると書かれていた。
[ccNe lang=”bash” theme=”blackboard”]python ./modules/python/src2/gen2.py ./build/modules/python_bindings_generator ./build/modules/python_bindings_generator/headers.txt[/ccNe]
上のコードはbuildディレクトリから実行するのではなく、一つ上の階層(opencv-3.4.2)で実行する。つまり、buildディレクトリから[cciNe lang=”bash” theme=”blackboard”]cd ..[/cciNe]を実行してから上記のコードを実行する必要があるということ。
