Read the statement by Michael Teeuw here.
MMM-Face-Reco-DNN (No module named 'face_recognition')
-
Hello everyone,
I installed MMM-Face-Reco-DNN according to the instructions and have been trying to find the error for days now.
There were no error messages during installation.I carried out the installation with “python3 -m venv ~/python-facereco” and also added the entry “source ~/python-facereco/bin/activate” to the end of the ~.bashrc.
Still I always get: "ModuleNotFoundError: No module named 'face_recognition’[39m
[31m at PythonShell.parseError (/home/ralph/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:303:21)[39m
[31m at terminateIfNeeded (/home/ralph/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:193:32)[39m
[31m at ChildProcess. (/home/ralph/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:185:13)[39m
[31m at ChildProcess.emit (node:events:519:28)[39m
[31m at ChildProcess._handle.onexit (node:internal/child_process:294:12)[39m
[31m ----- Python Traceback -----[39m
[31m File “/home/ralph/MagicMirror/modules/MMM-Face-Reco-DNN/tools/recognition.py”, line 1, in [39m
[31m import face_recognition {[39m ".Can someone help me?
-
-
@Zinkeler i think this is because the install sets up a python virtual environment. and you have to enable that before you start MagicMirror
-
@sdetweil I thought I did that with the entry in the /.bashrc!?
“source ~/python-facereco/bin/activate”
is that a mistake? -
@Zinkeler usually the venv folder names are preceded by a dot (are hidden on linux)
-
@sdetweil
Sorry, but i don´t find my mistake (there is no dot).
I think the venv is startet: (python-facereco)(python-facereco) ralph@raspberrypi:~/python-facereco/bin $ ls -lisa insgesamt 64 556865 4 drwxr-xr-x 2 ralph ralph 4096 25. Nov 21:08 . 556858 4 drwxr-xr-x 5 ralph ralph 4096 26. Nov 09:35 .. 556901 4 -rw-r--r-- 1 ralph ralph 2016 26. Nov 08:12 activate 556903 4 -rw-r--r-- 1 ralph ralph 942 26. Nov 08:12 activate.csh 556904 4 -rw-r--r-- 1 ralph ralph 2222 26. Nov 08:12 activate.fish 556902 12 -rw-r--r-- 1 ralph ralph 9033 26. Nov 08:12 Activate.ps1 557229 4 -rwxr-xr-x 1 ralph ralph 239 25. Nov 21:08 f2py 557234 4 -rwxr-xr-x 1 ralph ralph 257 25. Nov 21:08 face_detection 557235 4 -rwxr-xr-x 1 ralph ralph 259 25. Nov 21:08 face_recognition 557230 4 -rwxr-xr-x 1 ralph ralph 239 25. Nov 21:08 numpy-config 556898 4 -rwxr-xr-x 1 ralph ralph 244 25. Nov 20:31 pip 556899 4 -rwxr-xr-x 1 ralph ralph 244 25. Nov 20:31 pip3 556900 4 -rwxr-xr-x 1 ralph ralph 244 25. Nov 20:31 pip3.11 557232 4 -rwxr-xr-x 1 ralph ralph 233 25. Nov 21:08 pyav 556868 0 lrwxrwxrwx 1 ralph ralph 7 25. Nov 20:31 python -> python3 556867 0 lrwxrwxrwx 1 ralph ralph 16 25. Nov 20:31 python3 -> /usr/bin/python3 556869 0 lrwxrwxrwx 1 ralph ralph 7 25. Nov 20:31 python3.11 -> python3 (python-facereco) ralph@raspberrypi:~/python-facereco/bin $
-
@Zinkeler and it depends. if the bash session will be visualized, then bashrc is used. if not (like MagicMirror is started by pm2) then its another session script. don’t remember its name
BUT bashrc is NOT usedsee point 3 here
https://unix.stackexchange.com/questions/435625/does-a-noninteractive-login-shell-execute-profile-or-a-file-whose-name-is -
-
@sdetweil
I try to get it to work over the course of many days and hours, and then I write to you and solve the problem in a few chat rounds.
Thank you very much, you helped me a lot. -
@Zinkeler glad you go it!
-