Cannot import mpi4py after installing mpi4py-openmpi with yum.

Solution Verified - Updated -

Issue

  • Unable to import mpi4py inspite of installing mpi4py-openmpi with yum
> python
Python 2.7.5 (default, Feb 11 2014, 07:46:25) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages']
>>> import mpi4py
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named mpi4py
>>> sys.path.append('/usr/lib64/python2.7/site-packages/openmpi')
>>> import mpi4py
>>>

Environment

  • Red Hat Enterprise Linux 7
  • python

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.