install dlib with python 3.5 on ubuntu 16 -- how to link proper libboost .so file
NickName:wordsforthewise Ask DateTime:2016-07-02T17:13:40

install dlib with python 3.5 on ubuntu 16 -- how to link proper libboost .so file

I'm trying to install dlib version 19.0 on python 3.5 on a 64-bit ubuntu machine. So far I've done:

sudo apt-get install libboost-all-dev

I downloaded dlib version 19.0, then

tar xvjf dlib-19.0.tar.bz2
cd dlib-19.0
python setup.py install

Then I went into python, and tried importing dlib

import dlib

It gave me this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nate/anaconda3/lib/python3.5/site-packages/dlib-19.0.0-py3.5-linux-x86_64.egg/dlib/__init__.py", line 1, in <module>
    from .dlib import *
ImportError: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0: undefined symbol: PyClass_Type

I know I need to link the dlib to libboost_python-py35.so.1.58.0 (it's in the same /usr/lib/x86_64-linux-gnu/ directory), I just don't know how.

Copyright Notice:Content Author:「wordsforthewise」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/38158486/install-dlib-with-python-3-5-on-ubuntu-16-how-to-link-proper-libboost-so-fil

More about “install dlib with python 3.5 on ubuntu 16 -- how to link proper libboost .so file” related questions

install dlib with python 3.5 on ubuntu 16 -- how to link proper libboost .so file

I'm trying to install dlib version 19.0 on python 3.5 on a 64-bit ubuntu machine. So far I've done: sudo apt-get install libboost-all-dev I downloaded dlib version 19.0, then tar xvjf dlib-19.0...

Show Detail

Ubuntu Python: unable to pip install dlib - Failed building wheel for dlib and machine is almost stuck

I am trying to install dlib (machine learning library) for my django python environment. however, i cant get it installed. there is error and stuck. based on this instruction, this is what I did h...

Show Detail

ImportError: libboost_python.so.1.65.1: cannot open shared object file: No such file or directory

First of all, I am using ARM7 architecture . I downloaded dlib library using pre-build wheel file dlib-19.7.0-cp27-cp27mu-linux_armv7l.whl and download Boost.python libraries and built them for pyt...

Show Detail

Error in dlib installation AWS EC2 instance Ubuntu 16.04

I am trying to install dlib on EC2 ubuntu 16.04, I tried many options suggested on google like this, But getting above error, I install on my local machine which was quite simple and installed easi...

Show Detail

dlib and django. how to integrate and import dlib into django

I am trying to use dlib in my django project. I am using aws ubuntu, but I was not able to use pip dlib, so I compiled directly according davisking instruction to use this PR https://github.com/dav...

Show Detail

How to install dlib on Ubuntu VPS on digital ocean

I have created a ubuntu vps which has below specs: Linux ubuntu-sh5tb8912admin 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux I have to run pthon flas...

Show Detail

Failed to install dlib for python on Ubuntu

I try to install dlib on my python 3 virtual-env. I have cmake installed on my machine, the correct path of cmake is set in PATH. when running the command pip install dlib --verbose I get the follo...

Show Detail

Can't import .so file from another .so

Problem: From inside the virtual environment can't import dlib, which references dlib.so which references libboost_python.so: (venv) serj@venus ~/work/beautytorch $ python Python 2.7.6 (default, ...

Show Detail

Error during boost and dlib installation for Python 3.6

I am struggling to install dlib for Python 3.6 on Windows 10. I've installed and built boost, added ...\boost_1_63_0 folder along with ...\boost_1_63_0\stage\lib folder to the PATH. But I still ha...

Show Detail

Install dlib in python3 on mac

Getting the below as error: Collecting dlib Using cached dlib-19.1.0.tar.gz Installing collected packages: dlib Running setup.py install for dlib ... error Complete output from command /Li...

Show Detail