Hi fruity. As a start you can launch maya from the terminal that is in the Maya2016 dir ( same level as Maya.app ) that terminal run an sh /Applications/Autodesk/maya2016/Maya.app/Contents/bin/MayaENV.sh This is setting your maya env and the terminal behaves like the output window you mentioned earlier. simply type maya in term...
Hope this help. On Sun, Apr 10, 2016 at 12:19 AM, fruity <[email protected]> wrote: > when i run cat > /Applications/Autodesk/maya2016/Maya.app/Contents/bin/mayapy, > the terminal returns that : > 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 "$@" > > And indeed, i just tried to run "import > maya.standalone;maya.standalone.initialize()" in the mayapy interpreter, > and get the same error (Error : Singular matrix, no inverse exists). I have > this error with both maya2016 and maya2015. > > Just to be sure, what is the exact syntax to run maya from the terminal ? > Do i have to do something with mayapy, or executing only > ".../maya2015/Maya.app" should work ? > Thank you > > > > > Le samedi 9 avril 2016 22:51:20 UTC+1, Justin Israel a écrit : > >> >> >> On Sun, Apr 10, 2016 at 9:35 AM fruity <[email protected]> wrote: >> >>> So if i understand correctly, it is the mayapy file which is responsible >>> for registering all maya env variables, like MAYA_SCRIPT_PATH, >>> MAYA_PLUGIN_PATH, etc.... ? >>> Which means i don't need to export all those paths manually ? >>> >> >> Look at the contents of the shell script: >> $ cat /Applications/Autodesk/maya2016/Maya.app/Contents/bin/mayapy >> >> It is a bootstrap script. >> >> >>> For now, i added the path to mayapy in my bashrc file (export >>> PATH="/Applications/Autodesk/maya2016/Maya.app/Contents/bin:$PATH"), but >>> even if i start a new terminal and run Maya, it still doesn't work (by the >>> way, the error on maya 2016 is different : Singular matrix, no inverse >>> exists.. i have no idea of what that mean^^) >>> What is it that i'm doing wrong ? >>> >> >> I don't have 2016 handy at the moment to test (and when I do, its on >> Linux), so I can't comment on that. Are you saying you don't even get a >> functional python interpreter when you run "mayapy"? You don't even get to >> the point where you can run "import maya.standalone; >> maya.standalone.initialize()" ? >> >> >>> Thank you >>> >>> >>> >>> Le samedi 9 avril 2016 22:22:48 UTC+1, Justin Israel a écrit : >>> >>>> >>>> >>>> On Sun, Apr 10, 2016 at 9:07 AM <[email protected]> wrote: >>>> >>>>> Hi Justin, and thanks for your help, one more time =] >>>>> To run maya, i cd to the folder where Maya.app is >>>>> (/Applications/Autodesk/maya201*/) and then i run : >>>>> Maya >>>>> >>>> >>>> Yea, don't run that. >>>> >>>> $ find /Applications/Autodesk/maya2015/ -name "mayapy" >>>> /Applications/Autodesk/maya2015//Maya.app/Contents/bin/mayapy >>>> >>>>> >>>>> I also tried to run the actual Maya file, located in Contents/bin, but >>>>> same thing. What should i do with the mayapy before ? how do i 'run' it ? >>>>> 'python mayapy' gives me an error in the .py file >>>>> >>>> >>>> Don't run it as "python mayapy". It is actually a shell script >>>> You should be able to run that mayapy (it's got executable permissions) >>>> >>>> $ /Applications/Autodesk/maya2015//Maya.app/Contents/bin/mayapy >>>> Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) >>>> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin\ >>>> Type "help", "copyright", "credits" or "license" for more information. >>>> >>> >>>> >>>> Or put it into your PATH so its always there: >>>> >>>> *edit your ~/.bashrc file* >>>> export >>>> PATH="${PATH}:/Applications/Autodesk/maya2015/Maya.app/Contents/bin" >>>> >>>> Then it is always in your PATH: >>>> $ mayapy >>>> >>>> >>>>> Thank you >>>>> >>>>> >>>>> >>>>> >>>>> Le samedi 9 avril 2016 21:48:38 UTC+1, Justin Israel a écrit : >>>>> > Hi, >>>>> > >>>>> > >>>>> > I'm able to run "mayapy" just fine from an OSX terminal shell, which >>>>> loads Maya's proper environment. >>>>> > What command are you running? >>>>> > >>>>> > >>>>> > Justin >>>>> > >>>>> > >>>>> > On Sun, Apr 10, 2016 at 12:13 AM fruity <[email protected]> wrote: >>>>> > >>>>> > Hello, >>>>> > >>>>> > >>>>> > I am working on mac OS, and have some issues trying to run Maya from >>>>> the command line. At the moment, i don't have any feedback on what's going >>>>> on when i run a plugin, as i don't have the output window (Windows), nor >>>>> the bash window (Linux). So the idea would be to run Maya from the >>>>> terminal, so it'll be able to output things in it. >>>>> > >>>>> > >>>>> > The problem is that when i run it from the terminal, it breaks my >>>>> maya install. I did it for maya2013 for example, and now every time i open >>>>> my maya (from the command line or from the Applications folder), i have >>>>> some errors : >>>>> > - "New default menu sets found" : New menu sets are available. Your >>>>> menu set preferences must be updated to accept them, etc... >>>>> > - "Shelf Error" : the shelf General has items that cannot be read, >>>>> etc... >>>>> > >>>>> > >>>>> > Once maya starts, i have brand new preferences, and i can't do >>>>> anything (even creating a pSphere will return me a Syntax Error). >>>>> > Maybe it could be because maya doesn't see my userSetup/mayaEnv >>>>> files when i start it like that, causing some scripts to be not 'declared' >>>>> to the application ? >>>>> > I'm not sure that it's correct, and even if it is, do you have any >>>>> idea on how i could fix that, by any chance ? >>>>> > Can i run maya from the command line after giving it the same >>>>> variable env that it has when i double click on the Maya.app icon ? >>>>> > >>>>> > >>>>> > Any help would be really appreciated, it's really difficult to work >>>>> without being able to print anything ! >>>>> > Thanks for your help =] >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > >>>>> > You received this message because you are subscribed to the Google >>>>> Groups "Python Programming for Autodesk Maya" group. >>>>> > >>>>> > To unsubscribe from this group and stop receiving emails from it, >>>>> send an email to [email protected]. >>>>> > >>>>> > To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/python_inside_maya/5119a2da-9228-496b-87b5-050a64bfd65a%40googlegroups.com >>>>> . >>>>> > >>>>> > For more options, visit https://groups.google.com/d/optout. >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Python Programming for Autodesk Maya" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/python_inside_maya/f7fc167f-1d32-42ae-b320-b8fe48d08354%40googlegroups.com >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Python Programming for Autodesk Maya" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/python_inside_maya/92314324-9b9c-4c97-94f0-559e8e0ed294%40googlegroups.com >>> <https://groups.google.com/d/msgid/python_inside_maya/92314324-9b9c-4c97-94f0-559e8e0ed294%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/0dd038a3-365f-4c7b-a4b5-248291f2cf9a%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/0dd038a3-365f-4c7b-a4b5-248291f2cf9a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- ------------------------------------ [email protected] ------------------------------------ -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM48mzQrvSDG0-9U9sGQXU18KotPQywNGhtWMJ-WPgMPaUKeEA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
