Skip to content

Solve the problem: "cannot find -lboost_python3" when using Python3 Ubuntu16.04 #4843

Closed
@H-xie

Description

@H-xie

When

make all

cannot find -lboost_python3

occurred.

Then I went to

/usr/lib/x86_64-linux-gnu

search and found that the library file is in different name as

libboost_python-py35.so

so I made a link by following command

sudo ln -s libboost_python-py35.so libboost_python3.so 

which solved my problem.

Suggest that this step could add to Installation Guide

Activity

WeiCheng14159

WeiCheng14159 commented on Oct 28, 2016

@WeiCheng14159

solved my problem thx !

MarcosPieras

MarcosPieras commented on Nov 16, 2016

@MarcosPieras

Hi, I am in similar situation, which version of python and libboost did you use ?
Could you upload your Makefile.config file, please ?
thanks

varunagrawal

varunagrawal commented on Jan 19, 2017

@varunagrawal

This solution did not work for me, unfortunately. Any reason why?
I changed the boost_python3 in the Makefile.config to boost_python3-py35 and it worked perfectly.

MarcosPieras

MarcosPieras commented on Jan 20, 2017

@MarcosPieras

I solved using cmake. I modified the cmakelist.txt, I changed the interpreter line : set(python_version "3.5.2" CACHE STRING "Specify which Python version to use"). And It worked!

wujun

wujun commented on Aug 16, 2017

@wujun

Great solution!@H-adorable

xnming

xnming commented on Aug 23, 2017

@xnming

I am building caffe under Ubuntu 16.04. The solution for me is to change boost_python3 to boost_python-py35.

zwx19961130

zwx19961130 commented on Mar 5, 2018

@zwx19961130

Thank you. This has solved my question.

minhaj3

minhaj3 commented on Mar 16, 2018

@minhaj3

I am building caffe in Ubuntu 16.04. For me changing boost_python3 to boost_python-py35 worked. "boost_python3-py35" did not work for me.

edrozenberg

edrozenberg commented on Dec 14, 2018

@edrozenberg

For my Python 3.6 setup, something similar worked, ln -s libboost_python36.so libboost_python3.so

JFishLover

JFishLover commented on Mar 22, 2019

@JFishLover

thanks @minhaj3

tailongnguyen

tailongnguyen commented on Sep 7, 2019

@tailongnguyen

For those who tried all methods mentioned above and still got the error, check if you have already installed libboost by running: sudo apt-get install -y --no-install-recommends libboost-all-dev.

4 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wujun@shelhamer@varunagrawal@edrozenberg@xnming

        Issue actions

          Solve the problem: "cannot find -lboost_python3" when using Python3 Ubuntu16.04 · Issue #4843 · BVLC/caffe