[cctbxbb] Boost Import Error

Magnus Andersson magnus.andersson at scilifelab.se
Wed Jun 4 05:15:04 PDT 2014


Thanks Luc,

I have now updated by PYTHONPATH as you suggested:

export 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

, which indeed makes my /opt/local/bin/python2.7 find boost. However, now I get a new  error message, which is a little harder to interpret:

    import iotbx.pdb
  File "/Users/magnus/Downloads/cctbx_sources/iotbx/pdb/__init__.py", line 2, in <module>
    from cctbx.array_family import flex
  File "/Users/magnus/Downloads/cctbx_sources/cctbx/array_family/flex.py", line 2, in <module>
    import scitbx.array_family.flex
  File "/Users/magnus/Downloads/cctbx_sources/scitbx/array_family/flex.py", line 2, in <module>
    import boost.optional # import dependency
  File "/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/optional.py", line 2, in <module>
    import boost.python
  File "/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/python.py", line 57, in <module>
    ext = import_ext("boost_python_meta_ext")
  File "/Users/magnus/Downloads/cctbx_sources/boost_adaptbx/boost/python.py", line 36, in import_ext
    + ["  "+p for p in sys.path]))
ImportError: __import__("boost_python_meta_ext"): dlopen(/Users/magnus/Downloads/cctbx_build/lib/boost_python_meta_ext.so, 2): Symbol not found: boost::python::objects::function_object(boost::python::objects::py_function const&, std::__1::pair<boost::python::detail::keyword const*, boost::python::detail::keyword const*> const&)
  Referenced from: /Users/magnus/Downloads/cctbx_build/lib/boost_python_meta_ext.so
  Expected in: /usr/local/lib/libboost_python.dylib
 in /Users/magnus/Downloads/cctbx_build/lib/boost_python_meta_ext.so
  sys.path:
    
    /Users/magnus/Documents/TR-WAXS/magnus_testing/PyWAXS
    /Users/magnus/.venvburrito/lib/python/distribute-0.6.32-py2.7.egg
    /Users/magnus/.venvburrito/lib/python/virtualenv-1.8.4-py2.7.egg
    /Users/magnus/.venvburrito/lib/python/virtualenvwrapper-3.6-py2.7.egg
    /Users/magnus/.venvburrito/lib/python/stevedore-0.8-py2.7.egg
    /Users/magnus/.venvburrito/lib/python/virtualenv_clone-0.2.4-py2.7.egg
    /Users/magnus/.venvburrito/lib/python
    /Users/magnus/Downloads/cctbx_sources
    /opt/local/bin
    /Users/magnus/Downloads/cctbx_build/lib
    /Users/magnus/Downloads/cctbx_sources/boost_adaptbx
    /Users/magnus/Downloads/cctbx_sources/libtbx/pythonpath
    /usr/local/lib
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyObjC
    /Library/Python/2.7/site-packages

I don't know how to deal with this - any suggestions?

Thanks,

Magnus

On 03 Jun 2014, at 23:44, Luc Bourhis <luc_j_bourhis at mac.com> wrote:

>> Suggestions?
> 
> If you want to do it by hand, you need to parrot what cctbx.python does. You need to set the following environment variables:
> 
> 1. LIBTBX_BUILD
> that must be the path of cctbx_build next to cctbx_sources or cctbx_project
> 
> 2. PYTHONPATH
> at the very least it shall contain $LIBTBX_BUILD/lib:$CCTBXSRC:$CCTBXSRC/boost_adaptbx:$CCTBXSRC/libtbx/pythonpath
> 
> where $CCTBXSRC is the full path of cctbx_sources or cctbx_project
> 
> 3. DYLD_LIBRARY_PATH 
> It shall contain $LIBTBX_BUILD/lib
> 
> Best wishes,
> 
> Luc
> 
> _______________________________________________
> cctbxbb mailing list
> cctbxbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/cctbxbb

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20140604/7806dc90/attachment-0001.htm>


More information about the cctbxbb mailing list