ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there

前端 未结 21 1194
礼貌的吻别
礼貌的吻别 2020-11-22 14:12

I have a situation very much like the one at ImportError: DLL load failed: %1 is not a valid Win32 application, but the answer there isn\'t working for me.

My Python

相关标签:
21条回答
  • 2020-11-22 14:50

    I got this error when trying to import MySQLdb.

    What worked for me was to uninstall Python and then reinstall it.

    I got the error after installing npm (https://www.npmjs.com/get-npm). One thing it did was install Python even though I already had it.

    0 讨论(0)
  • 2020-11-22 14:51

    This has worked for me. I have tried different methods but this was my best solution.

    Open command prompt and type the following; pip install opencv-python. (make sure your internet is on). after that try importing it again.

    0 讨论(0)
  • 2020-11-22 14:58

    Update numpy.

    pip install numpy --upgrade

    Work for me!!

    0 讨论(0)
  • 2020-11-22 14:58

    This one worked with me

    pip install -- pywin32==227
    
    0 讨论(0)
  • 2020-11-22 14:58
    1. Please make sure that you have installed python 2.7.12 or below version otherwise you will get this error definitely.
    2. Make sure Oracle client is 64 bit installed if OS is 64 Bit.
    3. Make sure Microsoft Visual C++ Compiler for Python 2.7 is 64 for bit for 64 bit Os or 32 bit for 32 bit. Note:- IF ur OS is 64 bit install all package of 64 bit or if Os is 32 bit install 32 bit package.
    0 讨论(0)
  • 2020-11-22 14:59

    It has a very simple solution. After installing opencv place

    cv2.pyd from C:\opencv\build\python\2.7\ **x64** to C:\Python27\Lib\site-packages

    instead of, place cv2.pyd from C:\opencv\build\python\2.7\ **x86** to C:\Python27\Lib\site-packages

    0 讨论(0)
提交回复
热议问题