Tried to install the latest version of dlib on pycharm with latest python version 3.8 / 3.7
always the command throws error and installation fails
Asked
Active
Viewed 2,113 times
-2

Gautham
- 47
- 1
- 6
1 Answers
0
- Installed Pycharm
- Windows 10
- Python 3.8.3 (with pipenv, but should work with pip also)
ex: pipenv install (as virtual env)
since "pipenv install dlib" was giving installation errors after struggling for sometime, able to install the latest dlib library (dlib==19.20.0)
Below is the procedure which helped me to succeed in installing the latest dlib - we have to Manually compile the dlib for Python
- Install visual studio (I installed Microsoft Visual Studio Community 2019 Version 16.6.3)
- Make Sure to select Visual C++ Or C++ environment - complete the installation - Nothing else is needed
- Goto - https://cmake.org/download/ and download the cmake for 64bit (cmake-3.18.0-rc4-win64-x64.msi is what i installed)
- When installing, make sure to add CMake to the system path (once installation is complete -> check that Environment variable to see this is present)
- Goto https://pypi.org/project/dlib/ -> Click on "Download Files"
- dlib-19.20.0.tar.gz (is what i had as latest) -> Download the same
- extract the file "dlib-19.20.0.tar.gz" till you see the files (dlib, dlib.egg-info, python_examples, tools, MANIFEST.in, PKG-INFO, README.md setup.cfg, setup.py)
- Copy all these files (select all (ctrl+a)and copy(ctrl+c)) -> Make sure to copy only these files and not its parent directory along
- Goto site-packages in python installation (C:\Users<name>\AppData\Local\Programs\Python\Python38\Lib\site-packages)
- Paste all the files copied in step 7,8
- open command prompt and goto -> C:\Users<name>\AppData\Local\Programs\Python\Python38\Lib\site-packages
- execute command -> python setup.py install
Thats all you should be done - it might take 5 - 10 mins to complete the process, you should see something like below in the end Installed c:\users<name>\appdata\local\programs\python\python38\lib\site-packages\dlib-19.20.0-py3.8-win-amd64.egg Processing dependencies for dlib==19.20.0 Finished processing dependencies for dlib==19.20.0

Gautham
- 47
- 1
- 6