I followed the step how to install dlib python
on Windows and it works on CMD
but in Python's IDE
it said ImportError: No module named 'dlib'
I followed the step how to install dlib python
on Windows and it works on CMD
but in Python's IDE
it said ImportError: No module named 'dlib'
Follow these steps
Install CMAKE
pip install cmake
Then Install dlib
pip install dlib
There are 3 important steps to make it work.
Install Cmake Cmake download Link and add Path environment variable to its bin eg: C:/ProgramFiles/cmake/bin
Download Visual Studio Built Tools which will be around 4.56 GB Visual Studio Built Tools Link
Then use cmd to install dlib using
pip install dlib
This will do the job....
Do you tried to do a simple
pip install dlib
I think it can be useful!
In windows, you have to launch a cmd in admin Windows > CMD > Right - Click > Run as Administrator > Yes
You have multiple pythons, one Python 3.5 and one Python 3.6.
You installed this library in one python only, not in the other.
The library can be imported only in those pythons that you installed it in, not in any other pythons.
You need to install the library in the other python too, if you want to use it there.
Type py -0
in a terminal to get a list of available python versions (that the Python Launcher knows of).
You can also use where python
(windows builtin command) to get a list of all the python executables that can be found through the PATH
environment variable.
Then you can use py -3.5 -m pip install dlib
to install the library into that python. Or, if you know the path to that specific python (let's say C:\Python35\python.exe
), you can call that python directly: C:\Python35\python.exe -m pip install dlib
In ubantu 16.04 > Terminal> put these commands
sudo apt-get update
sudo apt-get install build-essential cmake
sudo apt-get install libopenblas-dev liblapack-dev
sudo apt-get install libx11-dev libgtk-3-dev
sudo apt-get install python python-dev python-pip
sudo apt-get install python3 python3-dev python3-pip
mkvirtualenv dlib_test -p python3
workon cv
pip install numpy
pip install dlib
sudo apt-get install build-essential cmake libopenblas-dev liblapack-dev libx11-dev libgtk-3-dev python python-dev python-pip python3 python3-dev python3-pip
–
Thermosiphon For Window's users:
Download Visual Studio Built Tools link : https://visualstudio.microsoft.com/visual-cpp-build-tools/
Open Command Prompt - run as Administrator
type and enter the command :- pip install dlib
pip install face-recognition
Any time you’re working on a Python project that uses external dependencies that you’re installing with pip, it’s best to first create a virtual environment:
follow the bellow link for best understanding: https://realpython.com/python-virtual-environments-a-primer/#create-it
once you create a virtual environment run your all pip commands over there you can easily install all libraries without any error. Thanks!!
© 2022 - 2024 — McMap. All rights reserved.
dlib
I am sick and tried of trying to install this – Hoberthobey