From 8f5b7fce849b64216068c087207343c81c3776ed Mon Sep 17 00:00:00 2001 From: Ahuva Kroizer Date: Tue, 13 Nov 2018 14:25:57 +0200 Subject: [PATCH] FAQ addition (#1606) * Add possible solution to ImportError issue --- docs/faq.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 85ba29d3c..99a12cb31 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -4,9 +4,13 @@ Frequently asked questions "ImportError: dynamic module does not define init function" =========================================================== -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, or vice versa). +1. Make sure that the name specified in PYBIND11_MODULE is identical to the +filename of the extension library (without prefixes such as .so) + +2. If the above did not fix the issue, 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, or vice versa). "Symbol not found: ``__Py_ZeroStruct`` / ``_PyInstanceMethod_Type``" ========================================================================