Anaconda import mpi4py but not mpi

2019-06-03 15:42发布

I installed anaconda on 32 bit windows system. Then installed the mpi4py package with conda install.

conda search mpi4py
Fetching package metadata .......
mpi4py                       2.0.0                    py27_0  defaults
                          *  2.0.0              py27_msmpi_0  mpi4py
                             2.0.0                    py34_0  defaults
                             2.0.0                    py35_0  defaults

The * should mean it is installed, right?

So in the anaconda terminal prompt, I can run python and do

import mpi4py

with no errors.

However,

from mpi4py import MPI
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.   

The conda repository for mpi4py did not have any more instructions, which makes me think there is some issue here with the configuration. Am I missing something?

1条回答
ら.Afraid
2楼-- · 2019-06-03 16:16

It looks like you don't have Microsoft MPI installed on your system. Did you get the following message when you did conda install mpi4py?

mpi4py requires that Microsoft MPI 6 be installed on the host system. That is a systemwide installation that is currently not available through conda. In order to successfully use mpi4py you must install Microsoft MPI and then append the bin directory of the MPI installation to your PATH environment variable. To install Microsoft MPI see https://www.microsoft.com/en-us/download/details.aspx?id=47259

Try downloading that installer and try again.

查看更多
登录 后发表回答