【问题标题】:ImportError: Python version mismatchImportError:Python 版本不匹配
【发布时间】:2020-11-15 01:20:53
【问题描述】:

我使用face_recognition python 库编写了一个简单的脚本。但是当我尝试执行脚本时,我遇到了错误。

Traceback (most recent call last):
  File "face.py", line 1, in <module>
    import face_recognition
  File "/home/user/.local/lib/python3.7/site-packages/face_recognition/__init__.py", line 7, in <module>
    from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
  File "/home/user/.local/lib/python3.7/site-packages/face_recognition/api.py", line 4, in <module>
    import dlib
ImportError: Python version mismatch: module was compiled for version 3.8, while the interpreter is running version 3.7.

如何解决?

【问题讨论】:

标签: python python-3.x face-recognition


【解决方案1】:

安装 Python 3.8,这样就可以解决问题了

【讨论】:

    猜你喜欢
    • 2019-06-27
    • 2016-12-09
    • 2012-04-22
    • 2023-03-19
    • 2019-01-12
    • 2011-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多