mpi4y not working on my machine using pycharm

167 views
Skip to first unread message

Jibran Zaffer

unread,
Oct 15, 2023, 2:46:45 AM10/15/23
to mpi4py
Hello. I wantred to run a simple program using MPI and mpi4py but it keeps giving me an error when i try to run it through pycharm. I tried running it through command prompt and it worked perfectly fine. Everytime i try to run it through pycharm it says 
ImportError: libmpi.so.12: cannot open shared object file: No such file or directory            
    from mpi4py import MPI    
Building wheels for collected packages: mpi4py
  Building wheel for mpi4py (pyproject.toml): started
  Building wheel for mpi4py (pyproject.toml): finished with status 'error'
Failed to build mpi4py

Lisandro Dalcin

unread,
Oct 15, 2023, 3:05:53 AM10/15/23
to mpi...@googlegroups.com
On Sun, 15 Oct 2023 at 09:46, Jibran Zaffer <jzaff...@gmail.com> wrote:
Hello. I wantred to run a simple program using MPI and mpi4py but it keeps giving me an error when i try to run it through pycharm.

I'm not a user of PyCharm. 

It is hard to tell exactly what's going on, you provided very little information to even guess what may be wrong in your setup.
A probable cause of your issue is that the Python process running within PyCharm is not getting the LD_LIBRARY_PATH environment variable. 

What Linux distro are you using?
How did you install PyCharm?
How did you configure the Python interpreter PyCharm is running?
How did you install the MPI implementation (which is MPICH, from the libmpi.so.12 shared library name)?

--
Lisandro Dalcin
============
Senior Research Scientist
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/
Reply all
Reply to author
Forward
0 new messages