Steps to put dlib in Python Tools for Visual Studio and have fun

Preface

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.

environment

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

And to execute

$ 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

Steps to put dlib in Python Tools for Visual Studio and have fun
Python Tools for Visual Studio Installation Guide
3 steps to put Python + mecab in yum only
Django with Python Tools 2.2 for Visual Studio (PTVS 2.2)
Settings for Python coding in Visual Studio Code
App development to tweet in Python from Visual Studio 2017
AWS SDK for Python (Boto3) development in Visual Studio 2017
Python development in Visual Studio 2017
Python development in Visual Studio
How to debug the Python standard library in Visual Studio
Tips for coding short and easy to read in Python
Useful tricks related to list and for statements in Python
A memo for those who use Python in Visual Studio (me)
Installation of Visual studio code and installation of python
How to hide the command prompt when running python in visual studio 2015
[Itertools.permutations] How to put permutations in Python
PUT gzip directly to S3 in Python
How to put a half-width space before letters and numbers in Python.
Tips for making small tools in python
How to use is and == in Python
Run Python in C ++ on Visual Studio 2017
Tips for those who are wondering how to use is and == in Python
First steps to try Google CloudVision in Python
How to generate permutations in Python and C ++
Run Python YOLOv3 in C ++ on Visual Studio 2017
Send messages to Skype and Chatwork in Python
Steps to develop a web application in Python
Try to calculate RPN in Python (for beginners)
To add a module to python put in Julialang
Data Science Workloads and RTVS in Visual Studio 2017
Sample to put Python Kivy in one file
To represent date, time, time, and seconds in Python
[Visual Studio Code] [Python] Tasks.json + problemMatcher settings for Python
How to plot autocorrelation and partial autocorrelation in python
Things to keep in mind when building automation tools for the manufacturing floor in Python
Problems and solutions for using the remote debugging environment for Linux apps in Visual Studio 2017
Rock-paper-scissors poi in Python for beginners (answers and explanations)
Convert timezoned date and time to Unixtime in Python2.7
Tool to make mask image for ETC in Python
[For beginners] How to use say command in python!
Translator in Python from Visual Studio 2017 (Microsoft Translator Text API)
How to run python in virtual space (for MacOS)
Preferences for playing Wave in Python PyAudio and PortAudio
Problems and countermeasures for Otsu's binarization overflow in Python
How to install Google Test / Google Mock in Visual Studio 2019
Write tests in Python to profile and check coverage
Make Visual Studio Code autocomplete for python external libraries
[Python] How to sort dict in list and instance in list
Japanese output when dealing with python in visual studio
Python # How to check type and type for super beginners
Recursively search for files and directories in Python and output
How to change python version of Notebook in Watson Studio (or Cloud Pak for Data)
[Visual Studio Code] [Python] [Windows] Support for garbled Japanese characters in Python in VS Code task / debug output
Seeking a unified way to wait and get for state changes in Selenium for Python elements
An introduction to statistical modeling for data analysis (Midorimoto) reading notes (in Python and Stan)
Refactoring tools for Python
Script to count and stop up to 5 seconds in Python in Blender
Try to make it using GUI and PyQt in Python
How to use linux commands in Visual Studio Code terminal
Enable the virtualenv Python virtual environment for Visual Studio Code
List method argument information for classes and modules in Python