PySide / Qt Import Error

后端 未结 5 1997
醉梦人生
醉梦人生 2020-12-28 16:18

I\'m trying to import PySide / Qt into Python like so and get the follow error:

from PySide import QtCore

ImportError: dlopen(/usr/local/lib/python2.7/site         


        
5条回答
  •  借酒劲吻你
    2020-12-28 16:44

    Well, the installer is somewhat broken, because the output from oTool should report a full path to the library (the path should be changed by the Pyside installer using install_name_tool).

    Instead of going mad understanding what part of the installer is broken, I suggest you define:

    DYLD_LIBRARY_PATH=/your/path/to/pyside/libraries
    export DYLD_LIBRARY_PATH
    

    This will force the executable loader to scan for libraries into the path you supply too, even it's not configured by the linker.

提交回复
热议问题