Can you do this first in your script...

import sys
print sys.path

You shouldn't even have to set those extra Maya env variables in your bash
profile since that is what the mayapy bootstrap is supposed to do for you.
Somehow you are clearing the PYTHONPATH or PYTHONHOME for the Maya Python
process

Justin

On Fri, Jun 30, 2017, 7:47 AM <[email protected]> wrote:

> I have been trying to run a maya script in batch mode that readjust pivots
> in a model that I have using mayapy on the terminal. When running the
> command below I run into an error saying Import error no module named
> "maya.standalone". Not too sure what to do.
>
>
> COMMAND:
> mayapy test.py
>
> FILE:
> test.py
>
> import maya.standalone
> try:
>         maya.standalone.initialize()
> except:
>         print "standalone already running"
>
> ENV VARIABLES:
> alias mayapy='/Applications/Autodesk/maya2017/Maya.app/Contents/bin/mayapy'
> export MAYA_LOCATION=/Applications/Autodesk/maya2017/Maya.app/Contents
> export PATH=$MAYA_LOCATION/bin:$PATH
> export PYHTONPATH=/opt/X11/lib/python2.6/site-packages
> # The original version is saved in .bash_profile.pysave
> PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
> export PATH
>
> --
> 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/8bae2ef3-5592-4bea-b327-ba0a174fc50b%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/CAPGFgA3SYiS%3DVtX8QHG_PkKWtBFYar_NBhyJJvZ6YJoJZ9q3cQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to