Мне нужно использовать libtiff
для проекта.
После выполнения этих шагов при запуске import libtiff появляется следующая ошибка:
OSError Traceback (most recent call last)
<ipython-input-1-3fa0885ae753> in <module>
20 import os
21 import pickle
---> 22 from libtiff import TIFF
23 import libtiff
24 libtiff.libtiff_ctypes.suppress_warnings()
c:\users\ajain7\appdata\local\programs\python\python36\lib\site-packages\libtiff\__init__.py in <module>
18 __all__ = ['TIFF', 'TIFF3D', 'TIFFfile', 'TiffArray', 'TiffFile', 'TiffFiles', 'TiffChannelsAndFiles', 'TiffBase']
19
---> 20 from .libtiff_ctypes import libtiff, TIFF, TIFF3D
21 from .tiff import TIFFfile, TIFFimage, TiffArray
22 from .tiff_file import TiffFile
c:\users\ajain7\appdata\local\programs\python\python36\lib\site-packages\libtiff\libtiff_ctypes.py in <module>
48 'PATH|LD_LIBRARY_PATH|..')
49
---> 50 libtiff = ctypes.cdll.LoadLibrary(lib)
51
52 libtiff.TIFFGetVersion.restype = ctypes.c_char_p
c:\users\ajain7\appdata\local\programs\python\python36\lib\ctypes\__init__.py in LoadLibrary(self, name)
424
425 def LoadLibrary(self, name):
--> 426 return self._dlltype(name)
427
428 cdll = LibraryLoader(CDLL)
c:\users\ajain7\appdata\local\programs\python\python36\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
346
347 if handle is None:
--> 348 self._handle = _dlopen(self._name, mode)
349 else:
350 self._handle = handle
OSError: [WinError 193] %1 is not a valid Win32 application