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

Python环境下安装face_recognition时出现CMake错误求助

Troubleshooting face_recognition Installation Issues

Hey there! Sorry to hear you're stuck getting face_recognition up and running even after prepping all those dependencies. Let's break down some steps to diagnose and fix this:

  • First, share the exact error message!
    The error output from your terminal or Python session is critical here—different errors (like compile-time failures, import errors, or version mismatches) need totally different fixes. Copy-paste the full error text (including any tracebacks) and we can zero in on the problem.

  • Verify dlib is properly installed in your environment
    Open a Python shell and run these commands:

    import dlib
    print(dlib.__version__)
    

    If this throws an error, your dlib installation is the root issue. face_recognition requires dlib 19.8 or newer, so double-check you have a compatible version.

  • Confirm all dependencies are in the same Python environment
    It’s easy to mix up environments (e.g., using conda but installing packages with system pip). Run:

    • On Linux/macOS: which python and pip list
    • On Windows: where python and pip list
      Make sure dlib, numpy, scipy, and Boost are all listed here, and that you’re using this same environment to install face_recognition.
  • Try a clean reinstall of face_recognition
    Sometimes cached installation files cause issues. Run these commands to start fresh:

    pip uninstall -y face_recognition
    pip install face_recognition
    

    If you’re installing from source, ensure you’re compiling with the correct CMake and Boost paths.

  • Check for missing system-level dependencies
    Even with CMake and Boost installed, some systems need extra libraries:

    • Linux: Install libopenblas-dev and liblapack-dev via your package manager (e.g., sudo apt-get install libopenblas-dev liblapack-dev)
    • macOS: Make sure Xcode Command Line Tools are up to date (xcode-select --install)
    • Windows: Confirm CMake’s executable path is added to your system PATH environment variable.

Once you share the specific error message, we can dig deeper into the exact problem!

内容的提问来源于stack exchange,提问作者Julian G

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.19 07:22:16