From 50ed3614ded7d6d51793c48ea9fe6ce1a0d03ee9 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 11 Apr 2016 17:38:25 +0200 Subject: [PATCH] added a faq entry about import issues --- docs/faq.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/faq.rst b/docs/faq.rst index bf282f6a..d1f46c26 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -3,6 +3,19 @@ Frequently asked questions (under construction) +ImportError: dynamic module does not define init function +========================================================= + +1. Make sure that the name specified in ``pybind::module`` and + ``PYBIND11_PLUGIN`` is consistent and identical to the filename of the + extension library. The latter should not contain any extra prefixes (e.g. + ``test.so`` instead of ``libtest.so``). + +2. If the above did not fix your issue, then you are likely using an + incompatible version of Python (for instance, the extension library was + compiled against Python 2, while the interpreter is running on top of some + version of Python 3) + Limitations involving reference arguments =========================================