You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows系统下Python的dlib安装失败求助(已装Anaconda、Cmake)

Troubleshooting dlib 19.4 Installation Issues with Conda

Hey there, sorry to hear you're stuck trying to install dlib 19.4 via Conda! Let's work through some common fixes that should get this sorted out for you.

  • First, update your Conda installation
    Outdated Conda versions often cause weird package resolution or dependency conflicts. Run these commands first to make sure everything's up to date:

    conda update -n base -c defaults conda
    conda update --all
    

    Once that's done, try re-running your original install command:

    conda install -c conda-forge dlib=19.4
    
  • Force Conda to prioritize the conda-forge channel
    Sometimes Conda's default channel priority might prevent it from finding the specific dlib version you want. You can temporarily override channels to force it to use conda-forge exclusively for this install:

    conda install -c conda-forge --override-channels dlib=19.4
    

    If you regularly use conda-forge packages, you can also set it as the strict priority channel permanently (this helps avoid similar issues in the future):

    conda config --add channels conda-forge
    conda config --set channel_priority strict
    
  • Check Python version compatibility
    dlib 19.4 is an older version, so it might not support newer Python releases (like 3.9+). First, check your current Python version:

    python --version
    

    If your version is too new, create a dedicated virtual environment with a compatible Python version (3.7 or 3.8 usually works for dlib 19.4) and try installing there:

    conda create -n dlib_env python=3.7
    conda activate dlib_env
    conda install -c conda-forge dlib=19.4
    
  • Fallback: Install from source with pip
    Since you already have CMake installed, compiling dlib from source via pip is a reliable fallback. Just make sure you have a C++ compiler set up (on Windows, install Visual Studio Build Tools and select the "Desktop development with C++" workload). Then run:

    pip install dlib==19.4
    

    Note: Compiling can take a few minutes, so be patient and keep your network connection stable.

内容的提问来源于stack exchange,提问作者Pavel Vorobyov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:02:15