Python Environment Error when launching Maya

1,958 views
Skip to first unread message

권지회

unread,
Jan 3, 2014, 5:16:41 AM1/3/14
to python_in...@googlegroups.com
When I am launching the Maya 2013,  output window gives me an error message like this (repititatively)


Could not find maya.utils._guiExceptHook.
Invalid Python Environment: Python is unable to find Maya's Python modules
Python Environment:
  PYTHONHOME = C:\Python25\
  PYTHONPATH = ;C:/Program Files/Autodesk/Maya2013/mentalray/scripts/AETemplates;C:/Program Files/Autodesk/Maya2013/mentalray/scripts/mentalray;C:/Program Files/Autodesk/Maya2013/mentalray/scripts/unsupported;C:/Program Files/Autodesk/Maya2013/mentalray/scripts
  System modules located at: C:\Program Files\Autodesk\Maya2013\bin\python26.zip
  Search path (sys.path):
    C:\Program Files\Autodesk\Maya2013\bin
    C:\Program Files\Autodesk\Maya2013
    C:\Program Files\Autodesk\Maya2013\mentalray\scripts\AETemplates
    C:\Program Files\Autodesk\Maya2013\mentalray\scripts\mentalray
    C:\Program Files\Autodesk\Maya2013\mentalray\scripts\unsupported
    C:\Program Files\Autodesk\Maya2013\mentalray\scripts
    C:\Program Files\Autodesk\Maya2013\bin\python26.zip
    C:\Python25\DLLs
    C:\Python25\lib
    C:\Python25\lib\plat-win
    C:\Python25\lib\lib-tk
    C:\Program Files\Autodesk\Maya2013\bin
    C:\Python25
    C:\Python25\lib\site-packages


Seems that all the directory paths are correct. Why is the Maya giving me an error like this?
I don't know this is the reason, but when I am trying to load the list of plug-ins available by  Window-Settings/Preference/Plug-in Manager, there is no plug-in names like the picture below.   





Output window message when clicking the menu is as below.




mental ray for Maya 2013
u'C:/Program Files/Autodesk/Maya2013/mentalray/plug-ins'
mental ray: version 3.10.1.4, Jan 31 2012, revision 165283
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/abcimport.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/abcimport.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/architectural.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/architectural.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/base.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/base.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/contour.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/contour.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/paint.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/paint.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/physics.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/physics.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/production.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/production.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/ptex.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/ptex.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/realflowShaders.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/realflowShaders.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/subsurface.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/subsurface.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/surfaceSampler.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/surfaceSampler.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/userdata.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/userdata.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/useribl.mi'
u'C:/Program Files/Autodesk/Maya2013/mentalray/shaders/include/useribl.mi'



Can anybody give me an advice to solve this problem?







Justin Israel

unread,
Jan 3, 2014, 6:14:56 AM1/3/14
to python_in...@googlegroups.com
I'm not up on my windows environment management lately, but have you tried removing that PYTHONHOME variable, which is set to your own python2.5 install?


--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ff373e30-315d-490d-bf91-d1d5578196d4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Marcus Ottosson

unread,
Jan 3, 2014, 6:15:45 AM1/3/14
to python_in...@googlegroups.com
Try moving your maya settings, C:\Users\Username\Documents\maya to someplace else and restart maya to see if that solves the problem.


--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ff373e30-315d-490d-bf91-d1d5578196d4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Marcus Ottosson
konstr...@gmail.com

권지회

unread,
Jan 3, 2014, 8:06:57 AM1/3/14
to python_in...@googlegroups.com
Many Thanks, Justin.  As you guessed, the environment variable "PYTHONHOME" was the problem. It is still a questioning matter. But because of the path which was set from another SW, python was not properly loaded, and that was the cause which brings the ridiculus display in regard with the plug-in lists. The problem was solved by your advice. Many Thanks.


Ævar Guðmundsson

unread,
Jan 3, 2014, 2:25:49 PM1/3/14
to python_in...@googlegroups.com
Keep in mind although your PYTHONHOME variable has been fixed your actual sys.path still contains python 2.5 in it.  Most likely you are not affected by this as Maya 2013 comes shipped with python 2.6 and all the libraries are there but in case further oddities arise try upgrading your core python install from 2.5 to 2.6 , it's this part in your sys.path:

    C:\Program Files\Autodesk\Maya2013\bin\python26.zip
    C:\Python25\DLLs
    C:\Python25\lib
    C:\Python25\lib\plat-win
    C:\Python25\lib\lib-tk

    C:\Program Files\Autodesk\Maya2013\bin
    C:\Python25
    C:\Python25\lib\site-packages


You can verify what's in your sys.path without waiting for a crash by typing in:

import sys
print [ n for n in sys.path ]

  and to keep things working as expected you should expect to see no reference in that list to python 2.5

A similar reference list can be read from the os module as well:

import os
print os.environ.get( 'PYTHONPATH' )

  This one should be exclusive to the same version python your Maya instance is using ( 2.6 , 2.7 if you move up to Maya 2014 )

Hope this helps, the error does look like a simple version mismatch issue but when those break the errors tend to be a bit messy.

권지회

unread,
Jan 4, 2014, 4:35:18 AM1/4/14
to python_in...@googlegroups.com
Aren't the import sys  commands in linux?  Are you talking about the system environment variable PATH?  I found that there was a path of C:\Python25\ in it, so I removed the part from the environment variable. 


2014년 1월 4일 토요일 오전 4시 25분 49초 UTC+9, Ævar Guðmundsson 님의 말:

Justin Israel

unread,
Jan 4, 2014, 5:03:41 AM1/4/14
to python_in...@googlegroups.com
sys.path is specific to python in general and not a platform specific concept. It is the full resolved list of search paths python will look at for importing new modules.


--
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 python_inside_m...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages