Orange Forum • View topic - [ImportError] Cannot find symbol in QtWebKit.so

[ImportError] Cannot find symbol in QtWebKit.so

A place to ask questions about methods in Orange and how they are used and other general support.

[ImportError] Cannot find symbol in QtWebKit.so

Postby Imory » Wed Mar 28, 2012 19:53

As I was able to use orange in Python command line, I tried to execute orange-canvas, but it showed me the following error message:

Traceback (most recent call last):
File "/usr/local/bin/orange-canvas", line 8, in <module>
execfile(__canvas)
File "/Library/Python/2.6/site-packages/Orange/OrangeCanvas/orngCanvas.pyw", line 13, in <module>
import orngTabs, orngDoc, orngDlgs, orngOutput, orngHelp, OWReport
File "/Library/Python/2.6/site-packages/Orange/OrangeCanvas/orngTabs.py", line 12, in <module>
import orngHelp
File "/Library/Python/2.6/site-packages/Orange/OrangeCanvas/orngHelp.py", line 3, in <module>
from PyQt4.QtWebKit import *
ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtWebKit.so, 2): Symbol not found: _kCFWebServicesProviderDefaultDisplayNameKey
Referenced from: /Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit
Expected in: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation


I then ran nm on /Library/Python/2.6/site-packages/PyQt4/QtWebKit.so, and it appeared that the symbol "_kCFWebServicesProviderDefaultDisplayNameKey" was not included indeed.

Could anyone help me on this?
Thanks.

/Imory

Re: [ImportError] Cannot find symbol in QtWebKit.so

Postby Imory » Wed Mar 28, 2012 19:55

The PyQt I am using is "PyQt-mac-gpl-4.9.1"

Re: [ImportError] Cannot find symbol in QtWebKit.so

Postby Imory » Thu Mar 29, 2012 7:07

I found this post via Google: https://bugreports.qt-project.org/browse/QTBUG-23157
It mentioned that Qt 4.8.0 Mac OS X binary library did not work with Snow Leopard...

I then uninstalled 4.8 and installed 4.7. When I tried to make and install PyQt again, it showed me the following error:
/Developer/Tools/Qt/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I. -I. -F/Library/Frameworks -D__APPLE__ -D__GNUC__ qpytextobject.h -o moc_qpytextobject.cpp
moc: Cannot create moc_qpytextobject.cpp
make[2]: *** [moc_qpytextobject.cpp] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2


I then tried it again with original v4.8 Qt library, and it showed the same error.
It worked before I installed QtSDK, so I intended to uninstall it, but failed to find any script to do so...

Could anyone offer any suggestions? Thanks.

Re: [ImportError] Cannot find symbol in QtWebKit.so

Postby Imory » Thu Mar 29, 2012 8:21

I happened open Qt Creator and clicked the update tab on the left. It fired the so-called "SDKMaintenanceTool" with which I could successfully uninstalled it. Actually I could find some search result now as I got the "correct" keyword. ;-)

As for the issue I posted above, it was actually caused by that version of PyQt, which was downloaded by "pip install PyQt". When I use a fresh one from the official website, it worked correctly. Sorry for the confusion.

For now, I am working with Qt Library 4.7.0 and PyQt 4.9.1, and finally I got Orange Canvas launched! Yeah~ =)

Re: [ImportError] Cannot find symbol in QtWebKit.so

Postby Imory » Thu Mar 29, 2012 8:26

I know there is an instruction in Ubuntu version (http://orange.biolab.si/trac/wiki/DevEnvironment). I would like to write a wiki page regarding how to build and install Orange on Mac OS X Snow Leopard. Could someone guide me where I should put it? Thanks.


Return to Questions & Support