2
votes

I'm trying to install PySide to use the Qt libraries for scraping a website. I was following the instructions on this site and installed PySide using MacPorts (py26-pyside).

This command:

from PySide.QtCore import *

Works fine. But:

from PySide.QtGui import *

gives me this error:

Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PySide/QtGui.so, 2): Library not loaded: /opt/local/lib/libpng12.0.dylib
Referenced from: /opt/local/lib/libQtGui.4.dylib
Reason: Incompatible library version: libQtGui.4.dylib requires version 45.0.0 or later, but libpng12.0.dylib provides version 44.0.0

I've tried updating any old ports and reinstalling libpng through MacPorts, but no luck.

Any ideas what I need to do?

1
Yes: ask on the MacPorts mailing list, irc channel, or forum or report a bug with their bug tracking tool - user3850

1 Answers

0
votes

It not a good idea mix use system build-in python(version 2.6) and PySide install by manual.

I got the same problem before and fix it after upgrade to py27-pyside.

please try py27-pyside via MacPorts

sudo port install py27-pyside