I'm following this guide https://cmusatyalab.github.io/openface/setup/ of installation. I did:
mkdir -p ~/src
cd ~/src
tar xf dlib-19.1.0.tar.gz
cd dlib-19.1.0/python_examples
mkdir build
cd build
cmake ../../tools/python
cmake --build . --config Release
sudo cp dlib.so /usr/local/lib/python3.4/dist-packages/
It says that at this point I should be able to run import dlib
, but if I run it from virtualenv gives me
ImportError: No module named dlib
If I run it outside from virtualenv it gives:
ImportError: dynamic module does not define init function (PyInit_dlib)
What am I doing wrong? How to install dlib for python?
UPD: I've tried same for Python2:
sudo cp dlib.so /usr/local/lib/python2.7/dist-packages/
and it worked for python2. So how to do the same for python3?
python
ispython2
on Ubuntu 14.04? Are you trying toimport dlib
frompython
or frompython3
?pip
to installdlib
. Or if yo havedlib
installed globally, you can create a virtualenv with the--system-site-packages
option.CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find PythonLibs (missing: PYTHON_LIBRARIES) (Required is at least version "3.4")