[Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

Reckoner reckoner@gmail....
Fri Oct 30 20:48:23 CDT 2009


> Robert Kern wrote:
> You can import numpy.core.multiarray on both machines?

Yes. For each machine separately, you can cPickle files with numpy
arrays without problems loading/dumping. The problem comes from
transferring the win32 cPickle'd files to Linux 64 bit and then trying
to load them. Transferring cPickle'd files that do *not* have numpy
arrays work as expected. In other words, cPICKLE'd lists transfer fine
back and forth between the two machines. In fact, we currently get
around this problem by converting the numpy arrays to lists,
transferring them, and then re-numpy-ing them on the respective hosts

thanks.


On Fri, Oct 30, 2009 at 11:13 AM, Reckoner <reckoner@gmail.com> wrote:
> Hi,
>
> % python -c 'import numpy.core.multiarray'
>
> works just fine, but when I try to load a file that I have transferred
> from another machine running Windows to one running Linux, I get:
>
> %  python -c 'import cPickle;a=cPickle.load(open("matrices.pkl"))'
>
> Traceback (most recent call last):
>  File "<string>", line 1, in <module>
> ImportError: No module named multiarray
>
> otherwise, cPickle works normally when transferring files that *do*
> not contain numpy arrays.
>
> I am using version 1.2 on both machines. It's not so easy for me to
> change versions, by the way, since this is the version that my working
> group has decided on to standardize on for this effort.
>
>
> Any help appreciated.
>


More information about the NumPy-Discussion mailing list