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

后端 未结 3 963
Happy的楠姐
Happy的楠姐 2020-12-18 10:45

I wish to import liblas module in Python 2.7 on window 64bit. If I import the module with IDLE (Python GUI) I have no problem.

If I use PyScripter \"PyScripter-v2.5.

3条回答
  •  隐瞒了意图╮
    2020-12-18 10:58

    Please make sure to have Python 2.7 64b edition :) or even though you are working on 64b OS, use the x86 (AKA 32b) edition of PyScripter

    Edit 1 (following comments exchange w/ Gianni)

    One should verify his/her entire Python process "composed" from same entities in the sense of 32b/64b builds (e.g. if your Python interpreter is 32b one, then it must use C types coming from C dll Python extensions which were compiled as 32b dlls).

    In our example (liblas) one should go to C:\Python27\lib\site-packages\liblas , find the extension dll and see its type via dumpbin , here is some picture for demonstration :

    enter image description here

提交回复
热议问题