简体   繁体   English

使用PySide / PyQt时出现问题

[英]Problem using PySide / PyQt

I'm trying to install PySide to use the Qt libraries for scraping a website. 我正在尝试安装PySide,以使用Qt库抓取网站。 I was following the instructions on this site and installed PySide using MacPorts (py26-pyside). 我按照此站点上的说明进行操作,并使用MacPorts(py26-pyside)安装了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. 我尝试过更新任何旧端口并通过MacPorts重新安装libpng,但是没有运气。

Any ideas what I need to do? 有什么想法我需要做什么?

It not a good idea mix use system build-in python(version 2.6) and PySide install by manual. 混合使用系统内置的python(2.6版)和手动安装PySide不是一个好主意。

I got the same problem before and fix it after upgrade to py27-pyside. 我之前遇到过同样的问题,并在升级到py27-pyside后对其进行了修复。

please try py27-pyside via MacPorts 请通过MacPorts尝试py27-pyside

sudo port install py27-pyside

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM