Joe Weidenbach
2018-09-01 22:36:34 UTC
Hey all,
During a recent bout of programming zealousness, I blew away most of my
previous mess of an environment and set myself to a cleaner package-based
install. Now, Iâve loaded maya for the first time since, and it canât load
python properly. There was a previous post in here about this for Maya
2013, but this is for 2018, and Iâd rather not resurrect a really old
thread.
Iâm on windows for this machine, but again I suspect that itâs a more
widespread issue as I have replicated it on Linux.
The package manager (chocolatey) set up python with the PYTHONHOME
environment variable, so now Maya canât find itâs python libraries.
The stack trace:
Could not find maya.utils._guiExceptHook.
Invalid Python Environment: Python is unable to find Maya's Python modules
Python Environment:
PYTHONHOME = C:\Python27
PYTHONPATH = ;C:/Program Files/Autodesk/Maya2018/plug-ins/ATF/scripts;C:/Program Files/Autodesk/Bifrost/Maya2018/scripts/boss;C:/Program Files/Autodesk/Bifrost/Maya2018/scripts/presets;C:/Program Files/Autodesk/Bifrost/Maya2018/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/MASH/scripts;d:/Users/joe/Documents/maya/modules/ZivaVFX-Maya-1_2/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/fbx/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/camd/scripts;C:/solidangle/mtoadeploy/2018/scripts;C:/ProgramData/Autodesk/ApplicationPlugins/ngskintools/Contents/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/camd/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/camd/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/substance/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/cafm;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/xmaya;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/ae;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/brushes;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/dialogs;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/fxmodules;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/tabs;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/util;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/widgets;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts
System modules located at: C:\Program Files\Autodesk\Maya2018\bin\python27.zip
Search path (sys.path):
C:\Program Files\Autodesk\Maya2018\bin
C:\Python27\lib\site-packages\rez-2.0.rc1.39-py2.7.egg
C:\Program Files\Autodesk\Maya2018\bin
C:\Program Files\Autodesk\Maya2018\plug-ins\ATF\scripts
C:\Program Files\Autodesk\Bifrost\Maya2018\scripts\boss
C:\Program Files\Autodesk\Bifrost\Maya2018\scripts\presets
C:\Program Files\Autodesk\Bifrost\Maya2018\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\MASH\scripts
d:\Users\joe\Documents\maya\modules\ZivaVFX-Maya-1_2\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\fbx\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\camd\scripts
C:\solidangle\mtoadeploy\2018\scripts
C:\ProgramData\Autodesk\ApplicationPlugins\ngskintools\Contents\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\substance\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\cafm
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\xmaya
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\ae
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\brushes
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\dialogs
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\fxmodules
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\tabs
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\util
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\widgets
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts
C:\Program Files\Autodesk\Maya2018\bin\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
Thereâs a huge number of these in the output, I expect itâs one per call to
Python.
Iâd not expect that unsetting PYTHONHOME is expected/required by autodesk
(although this disproves that theory), as the whole point of shipping
mayapy is to get away from requiring the system install of python (other
benefits include things like being able to use a python compiled with VC15,
allowing the use of PySide2). The question in my mind would be, has anyone
found a way to isolate Maya from the system python environment so it can be
run side by side with other development tools that require PYTHONHOME or
other features like this? I canât imagine itâs that rare of a need.
Also, I tried to work through this with no luck: Python from an external
interpreter
<https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/Maya/files/GUID-83799297-C629-48A8-BCE4-061D3F275215-htm.html>.
It seems that something in 2018 completely breaks using an external
interpreter that could, for example, use virtualenvs to manage dependencies
(this did work as recently as 2016).
Thanks in advance,
Joe
â
During a recent bout of programming zealousness, I blew away most of my
previous mess of an environment and set myself to a cleaner package-based
install. Now, Iâve loaded maya for the first time since, and it canât load
python properly. There was a previous post in here about this for Maya
2013, but this is for 2018, and Iâd rather not resurrect a really old
thread.
Iâm on windows for this machine, but again I suspect that itâs a more
widespread issue as I have replicated it on Linux.
The package manager (chocolatey) set up python with the PYTHONHOME
environment variable, so now Maya canât find itâs python libraries.
The stack trace:
Could not find maya.utils._guiExceptHook.
Invalid Python Environment: Python is unable to find Maya's Python modules
Python Environment:
PYTHONHOME = C:\Python27
PYTHONPATH = ;C:/Program Files/Autodesk/Maya2018/plug-ins/ATF/scripts;C:/Program Files/Autodesk/Bifrost/Maya2018/scripts/boss;C:/Program Files/Autodesk/Bifrost/Maya2018/scripts/presets;C:/Program Files/Autodesk/Bifrost/Maya2018/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/MASH/scripts;d:/Users/joe/Documents/maya/modules/ZivaVFX-Maya-1_2/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/fbx/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/camd/scripts;C:/solidangle/mtoadeploy/2018/scripts;C:/ProgramData/Autodesk/ApplicationPlugins/ngskintools/Contents/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/camd/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/camd/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/substance/scripts;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/cafm;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/xmaya;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/ae;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/brushes;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/dialogs;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/fxmodules;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/tabs;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/util;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts/xgenm/ui/widgets;C:/Program Files/Autodesk/Maya2018/plug-ins/xgen/scripts
System modules located at: C:\Program Files\Autodesk\Maya2018\bin\python27.zip
Search path (sys.path):
C:\Program Files\Autodesk\Maya2018\bin
C:\Python27\lib\site-packages\rez-2.0.rc1.39-py2.7.egg
C:\Program Files\Autodesk\Maya2018\bin
C:\Program Files\Autodesk\Maya2018\plug-ins\ATF\scripts
C:\Program Files\Autodesk\Bifrost\Maya2018\scripts\boss
C:\Program Files\Autodesk\Bifrost\Maya2018\scripts\presets
C:\Program Files\Autodesk\Bifrost\Maya2018\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\MASH\scripts
d:\Users\joe\Documents\maya\modules\ZivaVFX-Maya-1_2\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\fbx\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\camd\scripts
C:\solidangle\mtoadeploy\2018\scripts
C:\ProgramData\Autodesk\ApplicationPlugins\ngskintools\Contents\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\substance\scripts
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\cafm
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\xmaya
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\ae
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\brushes
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\dialogs
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\fxmodules
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\tabs
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\util
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts\xgenm\ui\widgets
C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\scripts
C:\Program Files\Autodesk\Maya2018\bin\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
Thereâs a huge number of these in the output, I expect itâs one per call to
Python.
Iâd not expect that unsetting PYTHONHOME is expected/required by autodesk
(although this disproves that theory), as the whole point of shipping
mayapy is to get away from requiring the system install of python (other
benefits include things like being able to use a python compiled with VC15,
allowing the use of PySide2). The question in my mind would be, has anyone
found a way to isolate Maya from the system python environment so it can be
run side by side with other development tools that require PYTHONHOME or
other features like this? I canât imagine itâs that rare of a need.
Also, I tried to work through this with no luck: Python from an external
interpreter
<https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/Maya/files/GUID-83799297-C629-48A8-BCE4-061D3F275215-htm.html>.
It seems that something in 2018 completely breaks using an external
interpreter that could, for example, use virtualenvs to manage dependencies
(this did work as recently as 2016).
Thanks in advance,
Joe
â
--
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0e7033ed-58d2-487b-accd-7c5e29138483%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 python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0e7033ed-58d2-487b-accd-7c5e29138483%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.