简体   繁体   中英

Python Dlib installation error : Could not find Boost

当我尝试在命令提示符Windows 10中使用pip install Dlib时,出现错误,提示即使我已编译并设置了BOOST_ROOTBOOST_LIBRARYDIR路径,它也“找不到Boost”。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM