'Error of Installing dlib in anaconda
I'm trying to install Dlib in anaconda python with this line:
conda install -c menpo dlib
and I'm getting error like this:
UnsatisfiableError: The following specifications were found to be in conflict:
- dlib
- xlwt
Use "conda info <package>" to see the dependencies for each package.
How can I solve this problem?
Solution 1:[1]
Path of core-meta: C/users/{xxx}/anaconda3/core-meta
Delete core-meta then run the following commands:
Conda update --allConda install dlib
These commands require an internet connection so keep wifi on during the command running process.
Here xxx is the username on your computer.
Solution 2:[2]
If you do not need the xlwt-package for your project, just create a new conda environment and install the dlip package locally in that environment.
Solution 3:[3]
you can also try following:
brew install cmake
brew install boost
then create a virtual environment using conda command
conda create -n dlib python=3.6 anaconda
Activate the environment
source activate dlib
run the following command
conda install pip
and finally install dlib using below command
pip install dlib
This worked for me.
Solution 4:[4]
For anaconda or miniconda3, please see the following installation procedures. It will comply with Python 3.7 in this way.
1.Install cmake with git
$ sudo apt-get install git cmake
2. Enter into the the directory
Please change user to your own username
$ cd /home/user/dlib
3. Compile dlib
$ python setup.py install
If meeting with the issue that you could not put the import statements of setuptools behind the import statement of distutils, please change the placement oder in setup.py in the directory of dlib.
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from distutils import log
from distutils.version import LooseVersion
4. Run the dlib unit test suite in the current working directory
Please note there is a sub-directory of dlib inlcuded in the directory of dlib.
$ cd dlib/test
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build . --config Release
$./dtest --runall
Cheers.
Solution 5:[5]
on mac system : you have to do it via brew
- brew install cmake
- brew install boost
- brew install boost-python --with-python3
After installing above packages if you need you can create your environment and proceed with dlib installation or you can simply run next step.
The dlib library doesn’t have any real Python prerequisites, but if you plan on using dlib for any type of computer vision or image processing, These are few libraries which you can install for dlib :
* NumPy
* SciPy
* scikit-image
- pip install numpy
5 pip install Scipy
pip install scikit-image
pip install dlib
you can check for more details on this link: https://www.pyimagesearch.com/2017/03/27/how-to-install-dlib/
Solution 6:[6]
You have to try by putting just:
conda install dlib
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | anothernode |
| Solution 2 | Thomas Grusz |
| Solution 3 | Vaibhav K |
| Solution 4 | |
| Solution 5 | Vaibhav K |
| Solution 6 | Carole |
