Reputation: 35
I need LibTIFF in order to compile TIFF images in PIL (as mentioned here in the documentation).
I started with a simple pip install LibTIFF
. After that installed successfully I tried running my code, which includes import LibTIFF
- but got the following error:
Traceback (most recent call last):
File "tile_fetch_4.py", line 14, in <module>
from libtiff import tiff
File "C:\Users\i\AppData\Local\Programs\Python\Python38\lib\site-packages\libtiff\__init__.py", line 20, in <module>
from .libtiff_ctypes import libtiff, TIFF, TIFF3D
File "C:\Users\i\AppData\Local\Programs\Python\Python38\lib\site-packages\libtiff\libtiff_ctypes.py", line 46, in <module>
raise ImportError('Failed to find TIFF library. Make sure that libtiff '
ImportError: Failed to find TIFF library. Make sure that libtiff is installed and its location is listed in PATH|LD_LIBRARY_PATH|..
Yet, when running pip instal libtiff
:
Requirement already satisfied: libtiff in c:\users\i\appdata\local\programs\python\python38\lib\site-packages (0.4.2)
Why doesn't it recognize LibTIFF?
Upvotes: 1
Views: 8436
Reputation: 1780
Go this site https://www.lfd.uci.edu/~gohlke/pythonlibs/#pylibtiff and download precompiled whl file and do pip install pylibtiff‑0.4.2‑cp38‑cp38‑win_amd64.whl
Upvotes: 2