Maya userSetup Python Not Running

I just diagnosed an issue with one of my artist’s setup where our toolset wasn’t working. I narrowed it down to the userSetup python file not being called for some reason, but the userSetup mel script was still being called.

Doing some google sleuthing, there may have once been a maya environment flag that disabled python startup files, but that didn’t seem to be the case with the machines I checked on.

I got our toolset working by running it through the userSetup mel script, but I’m curious to know if anyone has experienced this before and if you were able to fix it.

Cheers.

A couple of things worth checking:

  • Make sure the userSetup.py does not have errors. You can check Maya’s Output Window (Windows > Output Window) for that.
  • Make sure the userSetup.py path is in your pythons sys paths.
    You can run this code in Maya’s script editor to see all the sys paths:
import sys


for path in sys.path:
    print(path)

  • If that’s not the case, then you’d to place the userSetup.py in some of those sys paths or use Maya.env or a .mod file to add the custom path where your userSetup.py lives so it’s added at Maya startup, before the userSetup.py runs.

Hope it helps! :slight_smile: