How To Solve Issue Related To Installation Of Dlib On Windows 10?
Solution 1:
In my system i'd done using Anaconda. The Dlib library supports python 3.6 to 3.7.0 in conda environments.
follow the instruction to install face recognition model,
install Anaconda from https://www.anaconda.com/distribution/#download-section
in conda prompt, create an environment using this command
conda create --name env_name python=3.7.0
then activate the env
conda activate env_name
install dlib
conda install -c conda-forge dlib=19.17
- now install face_recogintion models using pip
pip install face_recogntion
Solution 2:
Installing face_recognition on Windows 10
Requirements:
Microsoft Visual Studio 2015 (or newer) with C/C++ Compiler installed.
Microsoft Visual C++ (MSVC) 14.0 installed (need to install the visual c++ build tools)
CMake for windows and add it to your system environment variables
Boost installed and added to system environment variables
Python 3 with the same system type as your OS (ie. 64-bit, 32-bit)
Installing MSVC 14.0 and Cmake for windows
- Download Microsoft C++ build tools from https://visualstudio.microsoft.com/visual-cpp-build-tools/ and install
- Once the installation finished, click on modify in the Visual Studio Build Tools 2019 (2) section
- Go to the Individual components tab, under the Compilers, build tools, and runtimes, tick on C++ CMake tools for Windows and MSVC v140
- VS 2015 C++ build tools (v14.00) and click modify. The Visual Studio Installer will begin to download and install MSVC 14.0 and Cmake for you
Adding MSVC 14.0 and Cmake to System Variables
- On the search tab, type This PC and right-click, choose properties
- Go to the Advanced system settings, under Advanced tab click on Environment Variables
- Under System variables, click New… and fill the following: Name: VS140COMNTOOLS Value: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
- Click OK
- Under User variables, click on variable named Path and click Edit…
- Click New and fill “C:\Program Files\CMake\bin”
- Click OK, click OK again
Installing Boost and face_recognition
- Download Boost library source code or binary release for your current MSVC from https://sourceforge.net/projects/boost/files/
- Extract the Boost source files into C:\local\boost_1_XX_X (X means the current version of Boost you have). You may need to create local directory
- Open Developer Command Prompt for Visual Studio and go to the current directory of Boost extracted and try these commands to compile Boost: bootstrap b2 -a --with-python address-model=64 toolset=msvc runtime-link=static
- If you successfully compile Boost, it should create compiled files in stage directory
- Go to Command prompt and type $ pip install face_recognition
Post a Comment for "How To Solve Issue Related To Installation Of Dlib On Windows 10?"