LoginSignup
1
0

More than 1 year has passed since last update.

pybind11 で ImportError: dynamic module does not define init function

Posted at

概要

pybond11でc++で自作したclassをbuildしてpythonでimportしたところ、
ImportError: dynamic module does not define init functionというエラーが出てきた。

原因

なんてことはない。。
PYBIND11_MODULE(モジュール名, m) が間違ってた。コンパイルされた.cpython-39-darwin.soファイル名と一致させて解決。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0