Message 1 of 7
mayapy2 not running userSetup.py files from PYTHONPATH?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Maya will run userSetup.py from any directory on PYTHONPATH. So if we have C:\ourdir\userSetup.py, and a script file "ourScript.py" that looks like this:
import maya.standalone
maya.standalone.initialize(name="python")we in Windows we can go:
SET PYTHONPATH=C:\ourdir
mayapy2 ourScript.py
and our userSetup.py gets executed during maya.standalon.initiialze() as expected.
However, with Maya 2022, at least with the Python 2 "mayapy2.exe", the standalone initialize doesn't seem to be executing the userSetup.py. Is this a glitch, or has Maya 2022 changed something about its startup sequence? If you run the GUI version "maya.exe -pythonver" with the same PYTHONPATH, it does work, so I'm not sure if it is something about mayapy2.