简体   繁体   English

Python 找不到 LibTIFF 库,即使已经安装了 LibTIFF

[英]Python cannot find LibTIFF library, even though LibTIFF is already installed

I need LibTIFF in order to compile TIFF images in PIL (as mentioned here in the documentation).我需要 LibTIFF 才能 PIL 中编译 TIFF 图像(如文档中所述)。

I started with a simple pip install LibTIFF .我从一个简单的pip install LibTIFF开始。 After that installed successfully I tried running my code, which includes import LibTIFF - but got the following error:成功安装之后,我尝试运行我的代码,其中包括import LibTIFF - 但出现以下错误:

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 :然而,当运行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?为什么它不识别 LibTIFF?

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 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 venv 找不到 python 库,即使我确实安装了它 - venv cannot find python library even though I definitely have it installed Win 7的库路径中未列出Libtiff - Libtiff not listed in library path on Win 7 我无法导入pylab-即使已经安装了matplotlib,numpy和scipy(Python) - I cannot import pylab - even though matplotlib, numpy and scipy are already installed (Python) 图书馆不在Pycharm中,即使我已经安装了它 - Library is not in Pycharm, even though i have already installed it Python3 找不到 pip3 安装的模块,即使它安装了 defintley - Python3 cannot find module installed by pip3 even though it is deffintley installed 库软件包不在模块PyCharm中,即使我已经安装了它 - Library package not in module PyCharm, even though I've already installed it CFFI即使在库中也找不到函数 - CFFI cannot find functions even though they are in the library scikit-surprise:python 找不到模块,即使 pip 将其列为已安装 - scikit-surprise: python cannot find module even though pip lists it as installed 即使正确安装,Python3仍找不到模块 - Python3 won't find a module even though it is properly installed 即使安装了python2.7(macOSX),也无法导入numpy - Cannot import numpy in python2.7 (macOSX) even though it is installed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM