Failure to import tif_lzw
Closed this issue · 3 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. I am using the Canopy Python installation v 1.1.1.1452, which includes
Enthought Canopy Python 2.7.3 | 64-bit [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
on linux2. I also installed tiff-4.0.3 from source. I set LD_LIBRARY_PATH to
include the Enthought Python lib directory, and subsequently the libtiff
directory in site-packages.
2. I downloaded pylibtiff using 'svn checkout
http://pylibtiff.googlecode.com/svn/trunk/ pylibtiff-read-only' and ran python
setup.py install.
3. I ran nosetests libtiff/tests/ from the pylibtiff-read-only directory.
What is the expected output? What do you see instead?
I get the following output with an import error for tif_lzw.:
$ nosetests libtiff/tests/
EEEEE
======================================================================
ERROR: Failure: ImportError (No module named tif_lzw)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
addr.filename, addr.module)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tests/test_lzw.py", line 4, in <module>
from libtiff import TIFFfile, TIFF
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/__init__.py", line 21, in <module>
from .tiff import TIFFfile, TIFFimage, TiffArray
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff.py", line 25, in <module>
from .tiff_file import TIFFfile
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_file.py", line 20, in <module>
from .tiff_sample_plane import TiffSamplePlane
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_sample_plane.py", line 8, in <module>
import tif_lzw
ImportError: No module named tif_lzw
======================================================================
ERROR: Failure: ImportError (No module named tif_lzw)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
addr.filename, addr.module)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tests/test_simple.py", line 5, in <module>
from libtiff import TIFF
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/__init__.py", line 21, in <module>
from .tiff import TIFFfile, TIFFimage, TiffArray
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff.py", line 25, in <module>
from .tiff_file import TIFFfile
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_file.py", line 20, in <module>
from .tiff_sample_plane import TiffSamplePlane
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_sample_plane.py", line 8, in <module>
import tif_lzw
ImportError: No module named tif_lzw
======================================================================
ERROR: Failure: ImportError (No module named tif_lzw)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
addr.filename, addr.module)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tests/test_tiff_array.py", line 6, in <module>
from libtiff import TIFF
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/__init__.py", line 21, in <module>
from .tiff import TIFFfile, TIFFimage, TiffArray
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff.py", line 25, in <module>
from .tiff_file import TIFFfile
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_file.py", line 20, in <module>
from .tiff_sample_plane import TiffSamplePlane
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_sample_plane.py", line 8, in <module>
import tif_lzw
ImportError: No module named tif_lzw
======================================================================
ERROR: Failure: ImportError (No module named tif_lzw)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
addr.filename, addr.module)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tests/test_tiff_file.py", line 6, in <module>
from libtiff import TIFF
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/__init__.py", line 21, in <module>
from .tiff import TIFFfile, TIFFimage, TiffArray
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff.py", line 25, in <module>
from .tiff_file import TIFFfile
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_file.py", line 20, in <module>
from .tiff_sample_plane import TiffSamplePlane
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_sample_plane.py", line 8, in <module>
import tif_lzw
ImportError: No module named tif_lzw
======================================================================
ERROR: Failure: ImportError (No module named tif_lzw)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
addr.filename, addr.module)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/rosborn/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tests/test_tiff_image.py", line 5, in <module>
from libtiff import TIFFfile, TIFFimage, TIFF
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/__init__.py", line 21, in <module>
from .tiff import TIFFfile, TIFFimage, TiffArray
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff.py", line 25, in <module>
from .tiff_file import TIFFfile
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_file.py", line 20, in <module>
from .tiff_sample_plane import TiffSamplePlane
File "/autonfs/home/rosborn/downloads/pylibtiff-read-only/libtiff/tiff_sample_plane.py", line 8, in <module>
import tif_lzw
ImportError: No module named tif_lzw
----------------------------------------------------------------------
Ran 5 tests in 0.449s
FAILED (errors=5)
If I succeed in suppressing the tif_lzw import error (by commenting out the
imports), I get a segmentation fault.
Original issue reported on code.google.com by rayneut...@gmail.com
on 30 Oct 2013 at 6:58
GoogleCodeExporter commented
I also experience this error with Continuum Anaconda distribution, on both OSX
10.8.4 and Linux Mint 16.
Original comment by eben.ol...@gmail.com
on 17 Feb 2014 at 10:15
GoogleCodeExporter commented
tif_lzw is an extension module that is built during installation. The import
error is raised because tests are run from source directory where Python picks
up unbuilt packages.
As a fix, change to different directory (that has no libtiff subdirectory) and
try using libtiff again.
If one does not want to install libtiff but just try it from source directory,
then one should run inplace build first.
Original comment by pearu.peterson
on 18 Feb 2014 at 1:49
GoogleCodeExporter commented
Original comment by pearu.peterson
on 13 Sep 2014 at 8:23
- Changed state: WontFix