Ld: library not found for -lboost_python

I install boost with brew install --build-from-source --with-python --fresh -vd boost . However, when I run make pycaffe in a Caffe project, I get this error: ld: library not found for -lboost_python . How to install this library? find / -name libboost_python* nothing is displayed.

+6
source share
2 answers

Run the brew install boost-python command. This will download, compile and install the boost package with boost-python support. boost-python is required for the pipmagick-engine pip package, and I ran into the same problem. To give you an idea of ​​what is going on, this is the result of the command:

 ==> Downloading https://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.tar.bz2 ######################################################################## 100.0% ==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost-python/1.57.0 --libdir=/usr/local/Cellar/boost-python/1.57.0/lib --with-libraries=python --with-python=python --with-python-root=/System/Library/Frameworks/Python.framework/Versions/2.7 ==> ./b2 --build-dir=build-python --stagedir=stage-python python=2.7 --prefix=/usr/local/Cellar/boost-python/1.57.0 --libdir=/usr/local/Cellar/boost-python/1.57.0/lib -d2 -j8 --layout=tagged --user-config=user-config.jam threading=multi,s 

You can also download, compile and symbolize the boost package (this is what I did initially), but it is much easier if the default paths work for you.

+4
source

It turns out that boost 1.56 seems to have problems with NVCC, so boost_python lib files are not installed. Installation using boost 1.55 works. I used:

 git checkout a252214 /usr/local/Library/Formula/boost.rb brew install --build-from-source --with-python --fresh -vd boost 

Thanks to this thread

+3
source

Source: https://habr.com/ru/post/976235/


All Articles