Errors when trying to import from PySide

449 views
Skip to first unread message

jettam

unread,
Oct 11, 2017, 12:00:54 AM10/11/17
to Python Programming for Autodesk Maya
I am learning how to build GUIs in Maya. I am using maya 2017

When I run this command I get this error.  I thought PySide was built into Maya? 

from PySide import QtGui, QtCore, QtUiTools
# Error: No module named PySide
# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
# ImportError: No module named PySide # 

I also get this error when trying to run Shiboken

from shiboken import wrapInstance
# Error: No module named shiboken
# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
# ImportError: No module named shiboken # 

Justin Israel

unread,
Oct 11, 2017, 12:06:13 AM10/11/17
to Python Programming for Autodesk Maya

Its supposed to be available. Have you done something to your PYTHONPATH to remove Maya's own site-packages?


--
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/a530ffaf-dafa-4239-884b-e8d4378942a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joe Weidenbach

unread,
Oct 11, 2017, 12:08:34 AM10/11/17
to Python Programming for Autodesk Maya

Maya 2017 has PySide2 (as compared to PySide), so it would be:

from PySide2 import QtCore, QtWidgets

And so on :)


jettam

unread,
Oct 11, 2017, 12:19:47 AM10/11/17
to Python Programming for Autodesk Maya
Thank you! This forum is so good. 


On Tuesday, October 10, 2017 at 9:08:34 PM UTC-7, Joe Weidenbach wrote:

Maya 2017 has PySide2 (as compared to PySide), so it would be:

from PySide2 import QtCore, QtWidgets

And so on :)


On Wed, Oct 11, 2017 at 5:06 PM Justin Israel <justin...@gmail.com> wrote:

Its supposed to be available. Have you done something to your PYTHONPATH to remove Maya's own site-packages?


On Wed, Oct 11, 2017, 5:00 PM jettam <justin...@gmail.com> wrote:
I am learning how to build GUIs in Maya. I am using maya 2017

When I run this command I get this error.  I thought PySide was built into Maya? 

from PySide import QtGui, QtCore, QtUiTools
# Error: No module named PySide
# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
# ImportError: No module named PySide # 

I also get this error when trying to run Shiboken

from shiboken import wrapInstance
# Error: No module named shiboken
# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
# ImportError: No module named shiboken # 

--
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+unsub...@googlegroups.com.

--
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+unsub...@googlegroups.com.

Justin Israel

unread,
Oct 11, 2017, 12:19:57 AM10/11/17
to Python Programming for Autodesk Maya


On Wed, Oct 11, 2017, 5:08 PM Joe Weidenbach <scd...@gmail.com> wrote:

Maya 2017 has PySide2 (as compared to PySide), so it would be:

from PySide2 import QtCore, QtWidgets

And so on :)


Nice catch 

Reply all
Reply to author
Forward
0 new messages