[PyQt] Problems with configuring compiling & installing pyqt5 on mac

Kenneth Miller kennethadammiller at yahoo.com
Tue Jan 28 21:36:05 GMT 2014


I'm on mac (Mountain Lion), and I get python import errors after going through all the trouble of trying to configure compile and install pyqt5. I need someone to help me get through this phase of troubleshooting to where I can just use pyqt, because right now I'm stuck terribly. Someone please help.

Here are as many details about my setup and the process that I go through in order to reproduce the problem.

I have python3.2 installed in /opt/local/bin/python3.2, which is a sym link to 
/opt/local/Library/Frameworks/Python.framework/Versions/3.2/bin/python3.2


I installed qt versions 5.2.0 and 5.0.2 into /Applications/Qt/5.2.0 and /Applications/Qt/5.0.2 respectively.

I download sip:   http://sourceforge.net/projects/pyqt/files/sip/sip-4.15.4/sip-4.15.4.tar.gz
Run the following commands:   

cd ~/Downloads/sip-4.15.4
sudo python3.2 configure.py 

And I get this information back:
The SIP code generator will be installed in
/opt/local/Library/Frameworks/Python.framework/Versions/3.2/bin.
The sip module will be installed in
/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages.
The sip.h header file will be installed in
/opt/local/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m.
The default directory to install .sip files in is
/opt/local/Library/Frameworks/Python.framework/Versions/3.2/share/sip.

make -j9
sudo make install


I download PyQt5: http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.2/PyQt-gpl-5.2.tar.gz
run the following commands:
cd ~/Downloads/PyQt-gpl-5.2.tar.gz
sudo python3.2 configure.py --qmake /Applications/Qt/5.2.0/clang_64/bin/qmake --sip ~/Downloads/sip-4.15.4/sipgen/sip

sudo make -j9 install

I follow the first line from this tutorial: http://pyqt.sourceforge.net/Docs/PyQt5/python_shell.html

>>> from PyQt5.QtWidgets import QApplication

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PyQt5/QtGui.so, 2): Symbol not found: __Z20qpyopengl_from_GLintPiPKil
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PyQt5/QtGui.so
  Expected in: flat namespace
 in /opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PyQt5/QtGui.so 

Why do I get this error? How do I fix it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140128/6f281631/attachment.html>


More information about the PyQt mailing list