Python Dlib installation error : Could not find Boost

1.9k views Asked by At

When I try to install Dlib using pip install Dlib in command prompt Windows 10, it gives an error which says that it "cannot find Boost" even though I have compiled it and set the BOOST_ROOT and BOOST_LIBRARYDIR paths.

1

There are 1 answers

0
Estérfano Lopes On

You can find some answers here from @Kyle.

As he said,

After you've compiled Boost, you need to do a couple things so that DLIB can find Boost. First, I set two environment variables, BOOST_ROOT and BOOST_LIBRARYDIR. I did this in the command window before I compiled DLIB, though you could also pass these two variables to CMAKE before running the build for DLIB. Something like:

set BOOST_ROOT=c:\Program Files\boost set BOOST_LIBRARYDIR=c:\Program Files\boost\stage\lib

Make sure you've built boost (and that second folder exists). I'm not sure if this is necessary, but you could add those two to your path just to make sure.

set PATH=%PATH%;%BOOST_ROOT%;%BOOST_LIBRARYDIR%

I expect it helps.