本文介绍了Anaconda导入mpi4py但不导入mpi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在32位Windows系统上安装了anaconda.然后使用conda install安装了mpi4py软件包.

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?

因此,在anaconda终端提示符下,我可以运行python并执行

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

import mpi4py

没有错误.

但是

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.

用于mpi4py的conda存储库没有更多说明,这使我认为这里的配置存在一些问题.我想念什么吗?

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?

推荐答案

似乎您的系统上未安装Microsoft MPI.当您执行conda install mpi4py时,是否收到以下消息?

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?

尝试下载该安装程序,然后重试.

Try downloading that installer and try again.

这篇关于Anaconda导入mpi4py但不导入mpi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-29 15:04