ImportError: dynamic module does not define module export function (PyInit_MPI)

Issue #58 invalid
Deepak Chandan created an issue

After compiling from source, during usage I get a "ImportError: dynamic module does not define module export function (PyInit_MPI)" with this line "from mpi4py import MPI". Surprisingly, if I go to the site-packages directory then importing MPI does not raise the above error. This is quite bizarre and I don't know how to resolve this. What might be causing the problem and how can it be resolved? I am using Python 3.

Comments (3)

  1. Lisandro Dalcin

    I guess you have an import path issue, and your Python 3 interpreter is picking a Python 2 mpi4py build.

    What's the output of the following command?:

    $ python3 -c "import mpi4py; print(mpi4py)"
    

    Does the path correspond to your Python 3 site-packages directory?

  2. Lisandro Dalcin
    • edited description
    • changed status to invalid

    This does not look like an issue in mpi4py. As the OP did not replied back, I'm closing it as invalid.

  3. Log in to comment