I got it working! Eclipse is WONDERFUL with setting up environment paths and
all the things I needed to have it run maya standalone.

Thank you!

For anyone else who has this problem I downloaded Eclipse and Pydev and
followed what these people did:
http://sourceforge.net/forum/message.php?msg_id=4800840

-Paige

On Sun, Jul 26, 2009 at 7:54 PM, Paige Young <[email protected]> wrote:

> OK thank you. I'll give it a try with eclipse.
>
> Paige
>
>
> On Sun, Jul 26, 2009 at 6:40 PM, Chad Dombrova <[email protected]> wrote:
>
>>
>> don't put the code in there, just hardwire the environment variables into
>> your plist the same way you're doing with  PYTHONPATH and MAYA_LOCATION.
>>  I've never used PListEdit Pro, but there's also this method:
>> http://www.astro.washington.edu/users/rowen/AquaEnvVar.html
>>
>> also, have you checked to see if idle has an environment configuration in
>> its preferences?
>>
>> i've never used idle, but i think i would recommend eclipse, wing, or
>> komodo instead (i'm immediately suspicious of any big app using tkinter, and
>> honestly something as big as an IDE is not the realm for pyQt either, as i
>> learned from trying Eric).  eclipse is much snappier, has more features, and
>> is also free and pymel comes with instructions on how to setup
>> autocompletion with eclipse.
>>
>> -chad
>>
>>
>>
>>
>> On Jul 26, 2009, at 3:18 PM, Paige Young wrote:
>>
>> Hi,
>>
>> Thanks for the fast reply.
>>
>> I did try to open mayapy and I put those commands into it earlier, however
>> I got a lot of syntax errors. I wrote:
>>
>> #path=`dirname $0`
>> pythonhome="$path/../Frameworks/Python.framework/Versions/Current
>>
>> and that's as far as I got. I couldn't figure out how to go any further
>> because no matter what I typed I would get a syntax error. At that time I
>> had deleted my environment variables to try to go with your method of typing
>> in mayapy, but when I hit the syntax errors I set the environment variables
>> up again. Am I doing something wrong or do I have to type something slightly
>> different on my computer?
>>
>> Paige
>>
>> On Sun, Jul 26, 2009 at 5:19 PM, Chad Dombrova <[email protected]> wrote:
>>
>>>
>>> you need to mimic what is going on in mayapy.  on osx and linux mayapy
>>> is just a shell script that sets up some environment variables before
>>> launching maya's python interpreter.  here's what it looks like:
>>>
>>> #!/bin/sh
>>>
>>> path=`dirname $0`
>>> pythonhome=$path/../Frameworks/Python.framework/Versions/Current
>>> export PYTHONHOME=$pythonhome
>>> export DYLD_LIBRARY_PATH=$path/../MacOS:$DYLD_LIBRARY_PATH
>>> export DYLD_FRAMEWORK_PATH=$path/../Frameworks:$DYLD_FRAMEWORK_PATH
>>> export MAYA_LOCATION=$path/..
>>> exec $pythonhome/Resources/Python.app/Contents/MacOS/Python "$@"
>>>
>>> here's a breakdown of what's happening in this script:
>>> 1) get the location of the mayapy file.  this is the maya bin directory
>>> 2) set PYTHONHOME to maya's python interpreter.  there is nothing
>>> special about maya's interpreter, other than it is guaranteed to work
>>> with maya's libraries ( same python version, same compiler, etc ).
>>> 3) set DYLD_LIBRARY_PATH so that maya's libraries are found, otherwise
>>> you get the "Library not loaded" error
>>> 4) set DYLD_FRAMEWORK_PATH so that maya's python framework is found
>>> and used.  on osx, i think this is redundant with PYTHONHOME, which is
>>> a more brute force method, but i might be mistaken.
>>> 5) set MAYA_LOCATION
>>> 6) execute maya's python interpreter
>>>
>>>
>>> to get Idle working, you need to make sure you properly set
>>> DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH.  on osx these values are:
>>>
>>> DYLD_LIBRARY_PATH    /Applications/Autodesk/maya2009/Maya.app/Contents/
>>> MacOS
>>> DYLD_FRAMEWORK_PATH    /Applications/Autodesk/maya2009/Maya.app/
>>> Contents/Frameworks
>>>
>>> hope that helps.
>>>
>>> -chad
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Jul 26, 2009, at 12:07 PM, Paige Young wrote:
>>>
>>> >
>>> > Hi,
>>> >
>>> > I've been trying to get Python Idle to work with Maya for a while now
>>> > and I just can't get it to work. I'm on a mac with Leopard. I set my
>>> > environment variables up with PListEdit Pro so the pythonpath is:
>>> >
>>> > /Applications/Autodesk/maya2008/maya.app/Contents/Frameworks/
>>> > Python.framework/Versions/Current/lib/python2.5/site-packages/
>>> >
>>> > and the Maya location is:
>>> >
>>> > /Applications/Autodesk/maya2008/maya.app/Contents
>>> >
>>> >
>>> > But I keep getting this error just trying to run maya.standalone and I
>>> > don't know how to fix it:
>>> >
>>> > Traceback (most recent call last):
>>> >  File "/Users/hoshi87/Documents/test.py", line 1, in <module>
>>> >    import maya.standalone
>>> > ImportError: dlopen(/Applications/Autodesk/maya2008/maya.app/Contents/
>>> > Frameworks/Python.framework/Versions/Current/lib/python2.5/site-
>>> > packages/maya/standalone.so, 2): Library not loaded: @executable_path/
>>> > libMaya.dylib
>>> >  Referenced from: /Applications/Autodesk/maya2008/maya.app/Contents/
>>> > Frameworks/Python.framework/Versions/Current/lib/python2.5/site-
>>> > packages/maya/standalone.so
>>> >  Reason: image not found
>>> >
>>> > Can someone please help me?
>>> >
>>> > >
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"python_inside_maya" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/python_inside_maya?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to