DLL加载失败:%1不是Enthought上的有效Win32应用程序

时间:2016-12-11 13:32:14

标签: python pycharm enthought

当我尝试在erdas文档上学习@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB) public static void ajustCompoundDrawableSizeWithText(final TextView textView, final Drawable leftDrawable, final Drawable topDrawable, final Drawable rightDrawable, final Drawable bottomDrawable) { textView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { @Override public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { if(leftDrawable != null){ leftDrawable.setBounds(0, 0, (int)textView.getTextSize(), (int)textView.getTextSize()); } if(topDrawable != null){ topDrawable.setBounds(0, 0, (int)textView.getTextSize(), (int)textView.getTextSize()); } if(rightDrawable != null){ rightDrawable.setBounds(0, 0, (int)textView.getTextSize(), (int)textView.getTextSize()); } if(bottomDrawable != null){ bottomDrawable.setBounds(0, 0, (int)textView.getTextSize(), (int)textView.getTextSize()); } textView.setCompoundDrawables(leftDrawable, topDrawable, rightDrawable, bottomDrawable); textView.removeOnLayoutChangeListener(this); } }); } 时,我遇到问题"ImportError: DLL load failed: %1 is not a valid Win32 application"。为此,我在Building Spatial Models in Python上使用Enthought Canopy (64-bit)。我想知道如何解决这个问题?应该下载Canopy 32位版本,但我的电脑是64位,顺便说一下。我的电脑上安装了Pycharm,我想知道64 bit version of ERDAS版本Erdas 32 bit模块是否可以解决这个问题?

这是示例代码:

Imagine

这是整个错误消息:

from exampleshelper import dataPath, outputPath
from imagine import modeler


m=modeler.Model()
ri = m.RasterInput(dataPath + "C:/Users/owrasa/PycharmProjects/den/data/lanier.img")
bandSelect = m.BandSelection(ri, "1:4")
sumBands = m.StackTotal(bandSelect)
ro = m.RasterOutput(sumBands, outputPath + "summing-image-layers.img")
m.Execute()

1 个答案:

答案 0 :(得分:0)

您正在尝试将32位DLL加载到64位应用程序中,这就是错误所在。将模块“转换”为32位的唯一方法是从源代码重新编译