[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ImportError: No module named multiarray



On 11/16/2011 11:06 AM, Mathieu Malaterre wrote:
2011/11/16 Zbigniew Jędrzejewski-Szmek<zbyszek@in.waw.pl>:
On 11/16/2011 10:03 AM, Mathieu Malaterre wrote:

[CC me please]

Hi all,

   I am trying to package a tiny python module:


http://mentors.debian.net/debian/pool/main/t/tifffile/tifffile_20111112-1.dsc

   I thought I did it right, but I cannot load the python module
properly when installed, it fails with:

Hi Mathieu,
the problem is that numpy import fails. Numpy has both pure-python and
compiled (e.g. multiarray.so) parts. When running a script, Python adds the
directory containing the script to sys.path. Numpy is supposed to be
imported from /usr/lib/pymodules/python2.7/numpy.
/usr/lib/pymodules/python2.7/numpy contains links to /usr/share/pyshared/.
Not all of numpy is is /usr/share/pyshared, but only the
architecture-independent parts. The end result is that it is not possible to
run a python script from /usr/share/pyshared.

Thanks for the info ! Does this means I simply need to install the
tifffile.py in /usr/bin then ? The tifffile.so python module will
remains at the same location.
It depends :)

If you want tifffile.py to be importable as a python module, than it probably should still be installed in /usr/lib/pymodules/... as usual.

Also, you probably the .py extension should be dropped for the executable in /usr/bin/.

You probably will need to provide a separate executable file in /usr/bin.

Best,
Zbyszek


Reply to: