gpt4 book ai didi

python - 在 OSX 10.6.8 上安装 PySide

转载 作者:太空狗 更新时间:2023-10-30 03:06:49 25 4
gpt4 key购买 nike

尝试接触 PySide 开发但遇到了麻烦正在设置。我尝试安装 binaries 1.0.4-r1 and 1.0.5但两者都在导入 PySide 时产生了以下消息

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/PySide/__init__.py", line 2,
in <module>
import private
File "/Library/Python/2.6/site-packages/PySide/private.py", line 2,
in <module>
from QtCore import __moduleShutdown

ImportError: dlopen(/Library/Python/2.6/site-packages/PySide/
QtCore.so, 2): Library not loaded: QtCore.framework/Versions/4/QtCore
Referenced from: /Library/Python/2.6/site-packages/PySide/QtCore.so
Reason: image not found

然后我尝试从 gitorious build scripts 进行安装.使用须藤./dependencies.osx.sh。完成后我现在得到了导入 PySide 时出现以下错误。

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/PySide/__init__.py", line 2,
in <module>
File "/Library/Python/2.6/site-packages/PySide/private.py", line 2,
in <module>
ImportError: No module named QtCore

欢迎任何建议。我正在使用 QtCreator 2.2.1 和 Qt SDK1.1.2/Qt 库 4.7.3。谢谢!

最佳答案

尝试先安装最新版本的 MacPorts 和 python 2.7,并将 python2.7 设置为默认 python 版本:

sudo port install python27
port select --list python
sudo port select --set python python27

然后再次重新安装 PySide:

sudo port install py27-pyside

关于python - 在 OSX 10.6.8 上安装 PySide,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6970319/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com