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

Pauli Virtanen pav+sp at iki.fi
Thu Nov 5 08:47:51 EST 2009


Wed, 04 Nov 2009 19:21:57 -0800, Reckoner wrote:
> Bruce :
> The file in question was created as shown in the prior e-mail. Here it
> is again:
> 
>>> cPickle.dump(a,open('from32bitxp.pkl','w'))

Your pickle files produced on Windows are contaminated by \r\n line 
feeds. AFAIK, pickle is supposed to be a binary stream.

You need to open the files in binary 'wb' mode, not in text 'w' mode.

-- 
Pauli Virtanen




More information about the NumPy-Discussion mailing list