I was blessed with the opportunity to touch python at work, so I decided to develop it with Visual Studio. https://www.visualstudio.com/vs/python/
The environment that is prepared without doing anything such as import or pip is wonderful, dlib didn't go smoothly with pip install, so I wrote a memo that I tried to get along with.
windows 10 Enterprise Visual Studio 2015 Visual C ++ installed Python Tools for Visual Studio installed
cmake I need cmake for the time being, so install it. I like Chocolatey very much, so I encourage you to use it.
$ choco install cmake
Then go to C: \ Program Files \ CMake \ bin
in your PATH.
Boost
: notebook: BOOST I referred to the following page. Thank you very much. http://tadaoyamaoka.hatenablog.com/entry/2016/09/22/223507
Boost is a huge group of C ++ libraries, and it's a great guy that ~~ dark ~~ C ++ er knows about.
Go to Boost's Official and download the one that suits your latest environment from windows binaryes
.
After that, download → move to the answer directory on powershell. After moving, let's do the following.
$ ./bootstrap.bat
$ ./b2 install
$ ./b2 -a --with-python address-model=32 toolset=msvc runtime-link=static
If: memo: address-model is 64, I am angry at the later processing, so I set it to 32. : memo: By the way, at this time, I was angry that pyconfig.hpp wasn't there, so I put the following path in my PATH. __ If the Python version is different, please fix it. __
%LOCALAPPDATA%\Programs\Python\Python35-32;
Once the Boost build is successful, reopen Visual Studio, right click on the project (not the solution) and ʻClick OpenCommandPrompt Here` to launch cmd.
Pass the BOOST path to cmd, please change the location of the __ directory. __
$ set BOOST_ROOT=C:\boost_1_61_0
$ set BOOST_INCLUDEDIR=C:\boost_1_61_0
$ set BOOST_LIBRARYDIR=C:\boost_1_61_0\stage\lib
$ pip install dlib
Collecting dlib
Using cached dlib-19.1.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib ... done
Successfully installed dlib-19.1.0
__ I did it. __ After that, check if it can be used! → I was able to use it!
Recommended Posts