[Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines
Mon Nov 2 18:31:38 CST 2009
thanks for the suggestion! I will look into it. The other thing is
that the numpy arrays in question are actually embedded in another
object. When I convert the numpy arrays into plain lists, and then
cPickle them, there is no problem with any of the larger objects. That
is the way we are currently working around this issue.
On Mon, Nov 2, 2009 at 2:43 PM, Bruce Southey <firstname.lastname@example.org> wrote:
> On Mon, Nov 2, 2009 at 2:42 PM, Reckoner <email@example.com> wrote:
>> Anybody have any ideas here?
>> Otherwise, I'm thinking this should be posted to the numpy bugs list.
>> What's the best way to report a bug of this kind?
>> On Fri, Oct 30, 2009 at 5:48 PM, Reckoner <firstname.lastname@example.org> wrote:
>>>> 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
>>> On Fri, Oct 30, 2009 at 11:13 AM, Reckoner <email@example.com> wrote:
>>>> % 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.
>> NumPy-Discussion mailing list
> Have you have tried the other Cookbook approaches:
> Like using numpy's own array io functions - load/save(z)?
> (seems to work between 64-bit Windows 7 and 64-bit Linux - each has
> different numpy versions)
> NumPy-Discussion mailing list
More information about the NumPy-Discussion