Menporul Poriyalan
Menporul Poriyalan

Reputation: 132

ImportError: Python version mismatch

I wrote a simple script using face_recognition python library. But when I tried to execute the script I am getting below error.

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.

How to resolve it?

Upvotes: 0

Views: 6043

Answers (1)

Talha Quddoos
Talha Quddoos

Reputation: 556

Install Python 3.8, this would solve the problem

Upvotes: 1

Related Questions