face_dlib.py error after upgrading to Fedora 40
Posted: Thu Jun 20, 2024 1:09 pm
I recently upgraded my server to Fedora 40 which also updated Python to 3.12 making it necessary to reinstall all of the packages necessary for ZMES to function. Everything is now working normally except for face recognition which throws the following error:
zmesdetect[1247004] ERR face_dlib.py:110 [Error loading KNN model: Can't get attribute 'EuclideanDistance' on <module 'sklearn.metrics._dist_metrics' from '/usr/local/lib64/python3.12/site-packages/sklearn/metrics/_dist_metrics.cpython-312-x86_64-linux-gnu.so'>]
I have done some research on this issue and it appears that versions of sklearn 1.3.0 and greater have changed the EuclideanDistance attribute names. The latest version of sklearn is 1.5.0 which is what I have installed. What I can't find is where this attribute is referenced in the code.
If anyone has seen this problem or has any suggestions please respond. Thanks!
zmesdetect[1247004] ERR face_dlib.py:110 [Error loading KNN model: Can't get attribute 'EuclideanDistance' on <module 'sklearn.metrics._dist_metrics' from '/usr/local/lib64/python3.12/site-packages/sklearn/metrics/_dist_metrics.cpython-312-x86_64-linux-gnu.so'>]
I have done some research on this issue and it appears that versions of sklearn 1.3.0 and greater have changed the EuclideanDistance attribute names. The latest version of sklearn is 1.5.0 which is what I have installed. What I can't find is where this attribute is referenced in the code.
If anyone has seen this problem or has any suggestions please respond. Thanks!