0

I have been attempting to install libtiff for python 2.7 using Anaconda 4.2.0 terminal:

conda install libtiff

pip install libtiff

I installed the libtiff library (GnuWin32) and have specified the directory of libtiff3.dll on my environment variable PATH. However when trying to import libtiff in Python I receive the following error:

File "C:\Users\Adam\Anaconda2\lib\ctypes\__init__.py", line 362, in __init__ self._handle = _dlopen(self._name, mode)

WindowsError: [Error 193] %1 is not a valid Win32 application

I have been searching for a solution to no avail. Any assistance would be appreciated.

Thank you.

Adam B.
  • 1
  • 1
  • can you try `where libtiff3.dll` from a command prompt? – Jean-François Fabre May 17 '17 at 19:47
  • Yes, it's in the appropriate directory: C:\Program Files\GnuWin32\bin\libtiff3.dll – Adam B. May 17 '17 at 19:53
  • Typical 32-/64-bit mismatch. You are either trying to load a 64-bit module into a 32-bit process or vice versa. Use a tool like [Process Monitor](https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx) to figure out, which module is failing to load. – IInspectable May 17 '17 at 19:55
  • I found the libtiff3.dll file using Process Monitor, and under the Process tab it's architecture is 64-bit. Using platform.architecture() in IPython console, Python is also running in 64-bit. Am I missing something here? – Adam B. May 17 '17 at 20:06
  • 32/64 is the most likely. Debug using dependency walker in profile mode. – David Heffernan May 17 '17 at 20:12

0 Answers0