Let's Get Maya And PyDev Working guys!

  • Alex Kessaris

    Alex Kessaris - 2008-02-26

    Hello all!

    How many of us share a common story.  We've been using Maya and MEL.  Now we're using maya and python.
    We  want to code a plugin, we need code completion.  We've found the excellent PyDev and PyDev extensions.  We've installed it on mac and windows..

    In the configuration we try everything we can..
    Some autocompletion works, but we get strange errors.

    We add the .pyc files as forced builtins.. They show up in the import statements but their internal functions aren't visible.
    We import maya.standalone but it gives errors in linking.
    We try to launch the python interpreter and it freezes.

    We go back to using our text editor and feel frustrated.

    Guys!  Let's make a step by step process for using Python and PyDev and PyDev Extensions with Maya on Mac, Linux and Windows.

    Can we extract the site-packages and use another python interpreter?
    Can we add all the modules by hand to the forced built-ins?

    Let's get this going together, then we can all  have the same success story!

    • Alex Kessaris

      Alex Kessaris - 2008-02-26

      Just a note on my setup:

      Macintosh OS X.5 Leopard
      Maya 2008, Eclipse and PyDev and PyDev Extensions (eval version)
      Added the Maya python interpreter to PyDev
      Added all the maya modules as forced built-ins
      It seems to be having a problem with dlopen loading the .so files.. Reason: image not found

      I think solving this problem would go a long way towards getting it up and running on OSX.  That would be a huge step forward for all of us. 

      Traceback (most recent call last):
        File "/Users/alex/Documents/workspace/one/src/helloWorld.py", line 56, in <module>
          import maya.OpenMaya as OpenMaya
        File "/engserv/rbuild/213/build/wrk/optim/runTime/Maya.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/maya/OpenMaya.py", line 6, in <module>
      ImportError: dlopen(/Applications/Autodesk/maya2008/Maya.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/maya/_OpenMaya.so, 2): Library not loaded: @executable_path/libOpenMaya.dylib
        Referenced from: /Applications/Autodesk/maya2008/Maya.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/maya/_OpenMaya.so
        Reason: image not found

    • Alex Kessaris

      Alex Kessaris - 2008-02-26


      Since the original posting I have gotten Maya and Python at least executing from within Eclipse.
      The instructions are here:


      However, code completion is still unavailable for the mostpart.

      Thank you!

    • Olivier Renouard

      Hi Alex,

      There has been a couple of message from Maya users earlier in this board (we might be 3 or 4...). Actually the code completion not working for maya commands (though it works for the API if you noticed) is not a PyDev problem but comes from the way maya.cmds is set up. It seems to contain only stubs and then is populated with the command list at run time. It's Autodesk that needs to be bugged about it.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks