pyQT installation not succesfull?

1,397 views
Skip to first unread message

efecto

unread,
Nov 29, 2009, 2:22:49 AM11/29/09
to python_inside_maya
Hi there. I'm just getting into pyqt for maya.

Platform: windows vista 32bit

I have read the doc(s), and I have python 2.5 and PyQt-Py2.5-
gpl-4.4.3-1 installed for maya2008.

What I have done:
- copied pyqt folder and sip files to Maya2008/Python/lib/site-
packages from python2.5 directory
- copied userSetup.py and pythonScripts.py to my maya/scripts folder

Error 1:
// when launching maya, it complains there is no module called
pythonScripts
// Error: No module named pythonScripts

Error 2:
import sys
import PyQt4 as qt
# works until this point , it imports PyQt4 as qt fine then it
complains there is no attribute called QApplication
app = qt.QApplication(sys.argv)

# Error: 'module' object has no attribute 'QApplication'
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# AttributeError: 'module' object has no attribute 'QApplication' #

Thanks in advance.

Brandon Harris

unread,
Nov 29, 2009, 10:31:07 AM11/29/09
to python_inside_maya
in PyQt you have to import the modules separately so you do something
more like

from PyQt4 import QtGui

So any of the classes under PyQt4 have to be imported on their own.

I believe you can also do it like so

from PyQt4 import QtGui as qtG

Hopefully this helps.

also you can check whether the path to your specified python file is
there by using sys.

import sys as sys

for stuff in sys.path:
print stuff


if your directory isn't in that list just append it.

sys.path.append('Path')

hopefully this help!!

Brandon L. Harris

efecto

unread,
Nov 29, 2009, 2:03:22 PM11/29/09
to python_inside_maya
Hi Brandon thanks.

I seem to be having another problem.

from PyQt4 import QtCore, QtGui
I get this error when i try running the code above.

# Error: DLL load failed: Invalid access to memory location.

Brandon Harris

unread,
Nov 29, 2009, 2:26:34 PM11/29/09
to python_inside_maya
I'm going to call that an installation error with your PyQt or your
python installation. I have yet to run into that error so I'm not as
confident in what the issue is.

Brandon L. Harris
Reply all
Reply to author
Forward
0 new messages