一半君的总结纸

听话只听一半君

maya 2013 ImportError: DLL load failed: %1 is not a valid Win32 application

又时候某些package在python interpreter里一切正常,但是在Maya里用的时候就出现错误提示

ImportError: DLL load failed: %1 is not a valid Win32 application

psuti1
比如 psutil 如果你是

pip install psutil

装的,在Maya2012里就可以用,但是2013就会碰到上面的出错提示,试了官网的precompiled binary也不行.不都是python2.6.4么,我猜自己装个2.6.4,然后pip install,这样一般总该可以用了吧.(我了个去,官网已经没有2.6.4的binary installer了,难道随便找个地方下?)

不过也可以:

  1. 下载psutil source
  2. 开vs2010 x64 command line prompt
  3. 设env var
    set INCLUDE=%INCLUDE%;"c:\Program Files\Autodesk\Maya2013\include\python2.6"
    set LIB=%LIB%;"c:\Program Files\Autodesk\Maya2013\lib"
    
  4. 进解开的source目录
    "c:\Program Files\Autodesk\Maya2013\bin\mayapy.exe" setup.py install

完后就能用了

psutil2

请程序员留言解释原理?我只是瞎搞知道这样可以,但具体原因是?(用程序员的术语解释)

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: