Re: [spyder] How to set DYLD_LIBRARY_PATH or equivalent for Spyder interpreter on Mac OS X?

547 views
Skip to first unread message

Carlos Córdoba

unread,
Jun 9, 2013, 10:08:26 PM6/9/13
to spyd...@googlegroups.com
It seems you are using MacPorts, so you just need to add an

export DYLD_LIBRARY_PATH=/foo/bar

in your .bashrc and then start a new terminal and run spyder on it and you'll be set.

Cheers,
Carlos

El 03/06/13 14:33, noah.r...@gmail.com escribió:
I'm running Mac OS X 10.8 and I am having a familiar problem with loading dynamically linked libraries.

I want to use the PyUblas module inside Spyder.  That has a dependency on boost_python which is a dynamically loaded libarary libboost_python.dylib.
When I use another python interpreter, called from the Terminal app command line, where I have DYLD_LIBRARY_PATH set in the environment to include the path of boost_python, my script works correctly.

Here is what I see in Spyder, demonstrating the issue:
>>> import pyublas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.8-x86_64.egg/pyublas/__init__.py", line 2, in <module>
    import pyublas._internal
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.8-x86_64.egg/pyublas/_internal.so, 2): Library not loaded: libboost_python.dylib
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.8-x86_64.egg/pyublas/_internal.so
  Reason: image not found


Sometimes setting an environment variable in environment.plist works.  I know from experience, that DYLD_LIBRARY_PATH is specifically ignored, however.

How can an interpreter in Spyder load this dynamic library?

Thanks.
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages