简体   繁体   English

OSError: [WinError 193] %1 不是有效的 Win32 应用程序 (LibTiff)

[英]OSError: [WinError 193] %1 is not a valid Win32 application (LibTiff)

I need to use libtiff for a project.我需要为一个项目使用libtiff

After doing these steps, when I am running import libtiff, the following error is coming:完成这些步骤后,当我运行 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

Another thing might have happened.可能发生了另一件事。 VS code automatically searches for the numpy and other packages from predefined OS locations. VS Code 会自动从预定义的操作系统位置搜索 numpy 和其他包。 You might be using the 32 bit version of numpy instead of a 64 bit version.您可能使用的是 32 位版本的 numpy 而不是 64 位版本。 To fix this, uninstall libtiff from all locations by typing pip uninstall libtiff为了解决这个问题,卸载libtiff通过键入的所有位置pip uninstall libtiff

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

相关问题 OSError: [WinError 193] %1 不是 Python 中的有效 Win32 应用程序 - OSError: [WinError 193] %1 is not a valid Win32 application in python OSError: [WinError 193] %1 不是有效的 Win32 应用程序 (Pandas) - OSError: [WinError 193] %1 is not a valid Win32 application (Pandas) OSError: [WinError 193] %1 不是有效的 Win32 应用程序 - python - OSError: [WinError 193] %1 is not a valid Win32 application - python OSError: [WinError 193] %1 不是有效的 Win32 应用程序 - OSError: [WinError 193] %1 is not a valid Win32 application OSError: [WinError 193] %1 不是有效的 Win32 应用程序 Python - OSError: [WinError 193] %1 is not a valid Win32 application Python OSError: [WinError 193] %1 不是 CTypes 中的有效 Win32 应用程序 - OSError: [WinError 193] %1 is not a valid Win32 application in CTypes OSError: [WinError 193] %1 不是有效的 Win32 应用程序 - nltk - OSError: [WinError 193] %1 is not a valid Win32 application - nltk 如何修复“OSError: [WinError 193] %1 不是有效的 Win32 应用程序” - How to fix"OSError: [WinError 193] %1 is not a valid Win32 application" Azure - numpy - OSError:[WinError 193]%1不是有效的Win32应用程序 - Azure - numpy - OSError: [WinError 193] %1 is not a valid Win32 application 无法解决OSError:[WinError 193]%1不是有效的Win32应用程序 - Unable to resolve OSError: [WinError 193] %1 is not a valid Win32 application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM