<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Ok, now I'm getting a little further at least.<div><br></div><div>But is encounter a new error message, which I don’t understand:</div><div><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">import iotbx.pdb</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/Users/magnus/Downloads/cctbx_sources/iotbx/pdb/__init__.py", line 2, in &lt;module&gt;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; from cctbx.array_family import flex</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/Users/magnus/Downloads/cctbx_sources/cctbx/array_family/flex.py", line 2, in &lt;module&gt;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; import scitbx.array_family.flex</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/Users/magnus/Downloads/cctbx_sources/scitbx/array_family/flex.py", line 2, in &lt;module&gt;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; import boost.optional # import dependency</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/optional.py", line 2, in &lt;module&gt;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; import boost.python</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/python.py", line 129, in &lt;module&gt;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; floating_point_exceptions = floating_point_exceptions()</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/python.py", line 122, in floating_point_exceptions</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; import libtbx.load_env</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/Users/magnus/Downloads/cctbx_sources/libtbx/load_env.py", line 5, in &lt;module&gt;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; libtbx.env = libtbx.env_config.unpickle()</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/Users/magnus/Downloads/cctbx_sources/libtbx/env_config.py", line 2194, in unpickle</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; set_preferred_sys_prefix_and_sys_executable(build_path=build_path)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/Users/magnus/Downloads/cctbx_sources/libtbx/env_config.py", line 2110, in set_preferred_sys_prefix_and_sys_executable</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; if (op.samefile(build_path, dirname)):</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 162, in samefile</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">&nbsp; &nbsp; s1 = os.stat(f1)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);">OSError: [Errno 2] No such file or directory: ''</div><div><br></div><div>Somewhere it was suggested to launch by: python ./script.py instead of python script.py</div><div><br></div><div>but in my case, that didn't help</div><div><br></div><div>Suggestions how to proceed from here?</div><div><br></div><div>Thanks,</div><div><br></div><div>Magnus&nbsp;</div><div>&nbsp;</div><div><div><div>On 04 Jun 2014, at 15:01, Gabor Bunkoczi &lt;<a href="mailto:gb360@cam.ac.uk">gb360@cam.ac.uk</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Hi Magnus,<br><br><blockquote type="cite">but what is $DYLIB_LIBRARY_PATH?<br></blockquote><br>Sorry, this should be DYLD_LIBRARY_PATH, as suggested by Luc's original answer below.<br><br><blockquote type="cite"><blockquote type="cite">It would probably be easier for you to rebuild the cctbx Python<br>bindings with the Python you want to use, and then all things would<br>work.<br></blockquote>I think that's what I'm trying to do. I want to avoid the cctbx<br>wrapper and therefore are launching python from my /opt/local/bin<br>install where I keep all the rest of the modules I need. It is only<br>cctbx that causes trouble. So I try to get "my" python to accept it.<br></blockquote><br>Yeah, but this may not work if there is some binary incompatibility. So far it looks you are lucky, and it may. If not, you have to rebuild. This will not change "your" python in any way, i.e. other extensions remain functional.<br><br>Gabor<br><br><blockquote type="cite">Thanks for you help in this matter - I appreciate it,<br>Magnus<br><blockquote type="cite">It only takes 10-20 minutes to compile even on a vintage computer.<br>BW, Gabor<br>On 2014-06-04 13:15, Magnus Andersson wrote:<br>Thanks Luc,<br>I have now updated by PYTHONPATH as you suggested:<br>export<br></blockquote>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><blockquote type="cite">, which indeed makes my /opt/local/bin/python2.7 find boost.<br>However,<br>now I get a new error message, which is a little harder to<br>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></blockquote>"/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/optional.py",<br><blockquote type="cite">line 2, in &lt;module&gt;<br>import boost.python<br>File<br></blockquote>"/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/python.py",<br><blockquote type="cite">line 57, in &lt;module&gt;<br>ext = import_ext("boost_python_meta_ext")<br>File<br></blockquote>"/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/python.py",<br><blockquote type="cite">line 36, in import_ext<br>+ [" "+p for p in sys.path]))<br>ImportError: __import__("boost_python_meta_ext"):<br></blockquote>dlopen(/Users/magnus/Downloads/cctbx_build/lib/boost_python_meta_ext.so,<br><blockquote type="cite">2): Symbol not found:<br></blockquote>boost::python::objects::function_object(boost::python::objects::py_function<br><blockquote type="cite">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></blockquote>/Users/magnus/.venvburrito/lib/python/virtualenvwrapper-3.6-py2.7.egg<br><blockquote type="cite">/Users/magnus/.venvburrito/lib/python/stevedore-0.8-py2.7.egg<br></blockquote>/Users/magnus/.venvburrito/lib/python/virtualenv_clone-0.2.4-py2.7.egg<br><blockquote type="cite">/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></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages<br><blockquote type="cite"></blockquote>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyObjC<br><blockquote type="cite">/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>Suggestions?<br>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>_______________________________________________<br>cctbxbb mailing list<br>cctbxbb@phenix-online.org<br>http://phenix-online.org/mailman/listinfo/cctbxbb<br>_______________________________________________<br>cctbxbb mailing list<br><a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br><a href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br></blockquote><br>--<span class="Apple-converted-space">&nbsp;</span><br>##################################################<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Dr Gabor Bunkoczi<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Cambridge Institute for Medical Research<br>&nbsp;&nbsp;&nbsp;&nbsp;Wellcome Trust/MRC Building<br>&nbsp;&nbsp;&nbsp;&nbsp;Addenbrooke's Hospital<br>&nbsp;&nbsp;&nbsp;&nbsp;Hills Road<br>&nbsp;&nbsp;&nbsp;&nbsp;Cambridge CB2 0XY<br>##################################################<br>_______________________________________________<br>cctbxbb mailing list<br><a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br><a href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a></div></blockquote></div><br></div></body></html>