Open YangBain opened 6 years ago
I hit the same problem :-( Did you solve it?
@haibo-qiu Sorry, I did not solve it. If you solve it please tell me how to solve it.
@YangBain I have not solved it directly yet. But I did compile caffe successfully yesterday. My solution is using Make instead of CMake. It seems like the libboost_python in my anaconda helps me. But I still don't know the reason behind that.
@haibo-qiu Could you give me some detailed information for how to use Make instead of CMake? Thanks.
@YangBain Sorry for not responding in time.
I modify the Makefile.config by adding a new line:
BOOST_DIR:=/usr/lib/x86_64-linux-gnu/
This is because I think the reason why we failed to compile caffe is that the version of libboost_python.so in Anaconda does not match what the Make need. Adding this new line is telling Make to use the libboost_python.so in the system itself instead of the Anaconda one when compiling caffe.
That is my own thought, which may be not exactly the true reason, but it did help me. Hope that also works for you.
PYTHON_LIBRARIES := boost_python-py27 python2.7 solved the libboost_python problem for me. Using system's default python2.7
PYTHON_LIBRARIES := boost_python-py27 python2.7 solved the libboost_python problem for me. Using system's default python2.7
That works for me~!!
for python 3.6 uncomment this line and change PYTHON_LIBRARIES := boost_python-py36 python3.6m
I was able to solve it manually changing symlink libboost_python.so to 3.5 verison
ln -s libboost_python-py35.so libboost_python.so
hello, I encounter this problem when compiling using cmake and py3, after I change the following line: set(python_version "3" CACHE STRING "Specify which Python version to use")
It works.
succes with boost 1.74 python 3.6 build caffe. step to do:
git clone --recursive https://github.com/boostorg/boost.git
cd boost
./bootstrap.sh --with-python-version=3.6 --with-python=python3
(for record in the next step, the --prefix installation folder of boost set to /usr/local, so I don't add it, for more info just ./bootstrap.sh --help or view it with any text editor)./b2
sudo ./b2 install
git clone caffe
cd caffe
PYTHON_LIBRARIES := boost_python-py27 python2.7
change to:
PYTHON_LIBRARIES ?= /usr/local/lib python3.6
reason: because we install boost that binding with python3.6 to that foldermkdir build
cd build
cmake ..
if you want make sure all option, run: ccmake .
or cmake-gui
,
you will see:
Boost_FILESYSTEM_LIBRARY_RELEASE /usr/local/lib/libboost_filesystem.so.1.74.0
Boost_INCLUDE_DIR /usr/local/include
Boost_PYTHON_LIBRARY_RELEASE /usr/local/lib/libboost_python36.so.1.74.0
Boost_SYSTEM_LIBRARY_RELEASE /usr/local/lib/libboost_system.so.1.74.0
Boost_THREAD_LIBRARY_RELEASE /usr/local/lib/libboost_thread.so.1.74.0
don't worry with:
boost_python-py36_DIR ---->>>> boost_python-py36_DIR-NOTFOUND
don't forget make sure path instalation is correct, see the:
CMAKE_INSTALL_PREFIX
, mine is /usr/local
make -j
sudo make install
DONE
if you have error, because of using newest OPENCV 3 / 4, I already give a clue to fix it in here
for python 3.6 uncomment this line and change PYTHON_LIBRARIES := boost_python-py36 python3.6m
what ever how to change ,i chang like this ,it also can find python3.6 alwaly default find python2.7
hello, I encounter this problem when compiling using cmake and py3, after I change the following line: set(python_version "3" CACHE STRING "Specify which Python version to use")
It works.
i set 3 but it find 3.5 it didn't found 3.6
Please use the caffe-users list for usage, installation, or modeling questions, or other requests for help. Do not post such requests to Issues. Doing so interferes with the development of Caffe.
Please read the guidelines for contributing before submitting this issue.
Issue summary
When build the caffe, I got the following errors. Who knows how to solve this problem. Thank you very much.
Steps to reproduce
If you are having difficulty building Caffe or training a model, please ask the caffe-users mailing list. If you are reporting a build error that seems to be due to a bug in Caffe, please attach your build configuration (either Makefile.config or CMakeCache.txt) and the output of the make (or cmake) command.
Your system configuration
Operating system: Compiler: CUDA version (if applicable): CUDNN version (if applicable): BLAS: Python or MATLAB version (for pycaffe and matcaffe respectively):