2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have 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 ファイル名と一致させて解決。

2
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?