python - Library not loaded: QtCore.framework/Versions/4/QtCore -


i trying gui programming in python.i figured out pyside framework start with.as running python 2.7.2 downloaded pyside 2.7 , tried running sample app.i got qtcore library not loaded error.

this error got..

from pyside import qtcore, qtgui importerror: dlopen(/library/python/2.7/site-packages/pyside/qtcore.so, 2):  library not loaded: qtcore.framework/versions/4/qtcore referenced from: /library/python/2.7/site-packages/pyside/qtcore.so reason: image not found 

i googled , found out many people facing same issue , saw solutions being posted based on exporting dyld_framework_path. not able follow this. please tell me whats issue , how fix it!! thanks..

you don't mention os working on, paths in error message looks you're on mac osx.

i'm not expert in pyside @ all, had same problem while ago , think know what's going on: library @ /library/python/2.7/site-packages/pyside/qtcore.so part makes qt core c++ library available python. wrapper though or sort of translator between c++ , python, actual c++ functionality elsewhere - , when python interpreter tries load c++ library contains functionality qtcore.framework/versions/4/qtcore, if fails find it, hence error message.

a quick , dirty way solve problem create symbolic links location qtcore.so expects c++ library is. that, have find c++ library. if downloaded qt 4.8.4 installer qt project page, libraries afaik somewhere in /usr/lib, create symlink this:

ln -vis /usr/lib/<insert subfolder>/qtcore.framework /library/python/2.7/site-packages/pyside/qtcore.framework 

you have in similar way qtgui , other qt library want use well. note not symlink library itself, folder in qtcore.so expects it.

an alternate way build pyside sources (which ended doing), takes longer - , sound want going python , qt.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -