我已经使用位于 中的我自己的 Qt4 库编译了一个 Python 模块~/opt/qt-4.6.0/
,但是当我尝试导入该模块时,加载的动态库来自我的 MacPorts Qt4 安装。
$ /opt/local/bin/python2.6
>>> import vtk
objc[58041]: Class QMacSoundDelegate is implemented in both /Users/luis/opt/qt-4.6.0/lib/QtGui.framework/Versions/4/QtGui and /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui. Using implementation from /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui.
objc[58045]: Class QCocoaColorPanelDelegate is implemented in both /Users/luis/opt/qt-4.6.0/lib/QtGui.framework/Versions/4/QtGui and /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui. Using implementation from /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui.
[... more output like above ...]
>>>
有没有办法告诉 Python(也从 MacPorts 安装)加载位于我的~/opt/qt-4.6.0/lib/
目录中的框架?我不确定要更改哪些环境变量。