<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi,<div><blockquote type="cite">I think the problem is that it is picking up libboost_python.dylib that was supplied with the system (in /usr/local/lib), and not the one that was used in compilation (in $LIBTBX_BUILD/lib). Could you check that there is a libboost_python.dylib in this directory?</blockquote><div><br></div><div>Yes, it's there.</div><br><blockquote type="cite"> What happens if you change the search order for the linker (if this was Linux, export DYLIB_LIBRARY_PATH=$LIBTBX_BUILD/lib:$DYLIB_LIBRARY_PATH would work, but on the Mac I do not know).<br><br></blockquote><div><br></div><div>I assume $LIBTBX_BUILD is&nbsp;<span style="background-color: rgb(19, 119, 62); color: rgb(255, 240, 165); font-family: Courier;">/Users/magnus/Downloads/cctbx_build/</span></div><div><br></div><div>in my case,</div><div><br></div><div>but what is $DYLIB_LIBRARY_PATH?</div><div><br></div><blockquote type="cite">It would probably be easier for you to rebuild the cctbx Python bindings with the Python you want to use, and then all things would work.</blockquote><div><br></div><div>I think that's what I'm trying to do. I want to avoid the cctbx wrapper and therefore are launching python from my /opt/local/bin install where I keep all the rest of the modules I need. It is only cctbx that causes trouble. So I try to get "my" python to accept it.</div><div><br></div><div>Thanks for you help in this matter - I appreciate it,&nbsp;</div><div><br></div><div>Magnus</div><div><br></div><br><blockquote type="cite"> It only takes 10-20 minutes to compile even on a vintage computer.<br><br>BW, Gabor<br><br>On 2014-06-04 13:15, Magnus Andersson wrote:<br><blockquote type="cite">Thanks Luc,<br>I have now updated by PYTHONPATH as you suggested:<br>export<br>PYTHONPATH=/Users/magnus/Downloads/cctbx_sources:/opt/local/bin:/Users/magnus/Downloads/cctbx_build/lib:/Users/magnus/Downloads/cctbx_sources:/Users/magnus/Downloads/cctbx_sources/boost_adaptbx:/Users/magnus/Downloads/cctbx_sources/libtbx/pythonpath:/usr/local/lib<br>, which indeed makes my /opt/local/bin/python2.7 find boost. However,<br>now I get a new error message, which is a little harder to interpret:<br> import iotbx.pdb<br> File "/Users/magnus/Downloads/cctbx_sources/iotbx/pdb/__init__.py",<br>line 2, in &lt;module&gt;<br> from cctbx.array_family import flex<br> File<br>"/Users/magnus/Downloads/cctbx_sources/cctbx/array_family/flex.py",<br>line 2, in &lt;module&gt;<br> import scitbx.array_family.flex<br> File<br>"/Users/magnus/Downloads/cctbx_sources/scitbx/array_family/flex.py",<br>line 2, in &lt;module&gt;<br> import boost.optional # import dependency<br> File<br>"/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/optional.py",<br>line 2, in &lt;module&gt;<br> import boost.python<br> File<br>"/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/python.py",<br>line 57, in &lt;module&gt;<br> ext = import_ext("boost_python_meta_ext")<br> File<br>"/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/python.py",<br>line 36, in import_ext<br> + [" "+p for p in sys.path]))<br>ImportError: __import__("boost_python_meta_ext"):<br>dlopen(/Users/magnus/Downloads/cctbx_build/lib/boost_python_meta_ext.so,<br>2): Symbol not found:<br>boost::python::objects::function_object(boost::python::objects::py_function<br>const&amp;, std::__1::pair&lt;boost::python::detail::keyword const*,<br>boost::python::detail::keyword const*&gt; const&amp;)<br> Referenced from:<br>/Users/magnus/Downloads/cctbx_build/lib/boost_python_meta_ext.so<br> Expected in: /usr/local/lib/libboost_python.dylib<br> in /Users/magnus/Downloads/cctbx_build/lib/boost_python_meta_ext.so<br> sys.path:<br> /Users/magnus/Documents/TR-WAXS/magnus_testing/PyWAXS<br> /Users/magnus/.venvburrito/lib/python/distribute-0.6.32-py2.7.egg<br> /Users/magnus/.venvburrito/lib/python/virtualenv-1.8.4-py2.7.egg<br> /Users/magnus/.venvburrito/lib/python/virtualenvwrapper-3.6-py2.7.egg<br> /Users/magnus/.venvburrito/lib/python/stevedore-0.8-py2.7.egg<br> /Users/magnus/.venvburrito/lib/python/virtualenv_clone-0.2.4-py2.7.egg<br> /Users/magnus/.venvburrito/lib/python<br> /Users/magnus/Downloads/cctbx_sources<br> /opt/local/bin<br> /Users/magnus/Downloads/cctbx_build/lib<br> /Users/magnus/Downloads/cctbx_sources/boost_adaptbx<br> /Users/magnus/Downloads/cctbx_sources/libtbx/pythonpath<br> /usr/local/lib<br> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip<br> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7<br>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin<br>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac<br>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages<br>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk<br>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old<br>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline<br>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload<br>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages<br>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyObjC<br> /Library/Python/2.7/site-packages<br>I don't know how to deal with this - any suggestions?<br>Thanks,<br>Magnus<br>On 03 Jun 2014, at 23:44, Luc Bourhis &lt;<a href="mailto:luc_j_bourhis@mac.com">luc_j_bourhis@mac.com</a>&gt; wrote:<br><blockquote type="cite"><blockquote type="cite">Suggestions?<br></blockquote>If you want to do it by hand, you need to parrot what cctbx.python<br>does. You need to set the following environment variables:<br>1. LIBTBX_BUILD<br>that must be the path of cctbx_build next to cctbx_sources or<br>cctbx_project<br>2. PYTHONPATH<br>at the very least it shall contain<br></blockquote>$LIBTBX_BUILD/lib:$CCTBXSRC:$CCTBXSRC/boost_adaptbx:$CCTBXSRC/libtbx/pythonpath<br><blockquote type="cite">where $CCTBXSRC is the full path of cctbx_sources or cctbx_project<br>3. DYLD_LIBRARY_PATH<br>It shall contain $LIBTBX_BUILD/lib<br>Best wishes,<br>Luc<br>_______________________________________________<br>cctbxbb mailing list<br><a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>http://phenix-online.org/mailman/listinfo/cctbxbb<br></blockquote>_______________________________________________<br>cctbxbb mailing list<br><a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>http://phenix-online.org/mailman/listinfo/cctbxbb<br></blockquote><br><br>_______________________________________________<br>cctbxbb mailing list<br><a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>http://phenix-online.org/mailman/listinfo/cctbxbb<br></blockquote></div><br></body></html>