Managing Conflicting Versions of PySide

87 views
Skip to first unread message

Tim Crowson

unread,
Feb 20, 2015, 1:59:45 PM2/20/15
to python_in...@googlegroups.com
So we're wanting to use PySide in several tools that have nothing to do with Maya (other DCCs, standalone tools, etc.) and currently, we all load common Python libraries via a shared network location and a PYTHONPATH environment variable in Windows (not in Maya.env). The version of Pyside we'd like to use is 1.2.2.

Well Maya 2015 doesn't like that one bit. It will load PySide 1.2.2 instead of its own internal version (which seems to be 1.2.0), and apparently Xgen just doesn't know what to do with that and this fails to load.

Maya.env's version of PYTHONPATH seems to act as an 'append' rather than a replacement. Is there a way to tell Maya to flat out ignore the PYTHONPATH envar in our Windows settings, and only use the one from Maya.env?

Flippin' version conflicts... I swear....

-Tim Crowson
Magnetic Dreams

Tim Crowson

unread,
Feb 20, 2015, 2:12:17 PM2/20/15
to python_in...@googlegroups.com
Ah! I can just remove that path from sys.path in userSetup.py.... That's one odd but feasible option...

Justin Israel

unread,
Feb 20, 2015, 2:25:37 PM2/20/15
to python_in...@googlegroups.com
Yea that seems like the option you have to take. It is either modifying it via the userSetup.py or having to use a custom maya launch wrapper (which is what we do at our studio). 

--
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/CAPh%3D1b%3Dn10sHjY0XiADKJ%2B73%2BrjYL7xsCBFBe8hPTA2ZzitE3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Tony Barbieri

unread,
Feb 20, 2015, 3:37:36 PM2/20/15
to python_in...@googlegroups.com
We also use a wrapper.  We also stopped using PYTHONPATH for anything but the path to our sitecustomize.py file.  One issue we saw is everything added to PYTHONPATH would be added before the standard python libraries.  This caused pretty severe slowdowns when doing imports because those network locations would be scanned before scanning the python install directories.  Instead we have a different variable, PSYOP_PYTHONPATH, which we use and add to the sys.path in our sitecustomize.py using site.addsitedir.  A bit more work...Another happy side effect is Maya's PySide would be found before our globally installed version.


For more options, visit https://groups.google.com/d/optout.



--
Tony
Reply all
Reply to author
Forward
0 new messages