MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Face-Reco-DNN (No module named 'face_recognition')

    Scheduled Pinned Locked Moved Solved Troubleshooting
    9 Posts 2 Posters 388 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z Offline
      Zinkeler
      last edited by

      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’
       at PythonShell.parseError (/home/ralph/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:303:21)
       at terminateIfNeeded (/home/ralph/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:193:32)
       at ChildProcess. (/home/ralph/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:185:13)
       at ChildProcess.emit (node:events:519:28)
       at ChildProcess._handle.onexit (node:internal/child_process:294:12)
       ----- Python Traceback -----
       File “/home/ralph/MagicMirror/modules/MMM-Face-Reco-DNN/tools/recognition.py”, line 1, in 
       import face_recognition { ".

      Can someone help me?

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Zinkeler
        last edited by

        @Zinkeler just add the source command to the mm.sh

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        Z 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @Zinkeler
          last edited by

          @Zinkeler i think this is because the install sets up a python virtual environment. and you have to enable that before you start MagicMirror

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          Z 1 Reply Last reply Reply Quote 0
          • Z Offline
            Zinkeler @sdetweil
            last edited by

            @sdetweil I thought I did that with the entry in the /.bashrc!?
            “source ~/python-facereco/bin/activate”
            is that a mistake?

            S 2 Replies Last reply Reply Quote 0
            • S Offline
              sdetweil @Zinkeler
              last edited by

              @Zinkeler usually the venv folder names are preceded by a dot (are hidden on linux)

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              Z 1 Reply Last reply Reply Quote 0
              • Z Offline
                Zinkeler @sdetweil
                last edited by

                @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 $
                
                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @Zinkeler
                  last edited by sdetweil

                  @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 used

                  see point 3 here
                  https://unix.stackexchange.com/questions/435625/does-a-noninteractive-login-shell-execute-profile-or-a-file-whose-name-is

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @Zinkeler
                    last edited by

                    @Zinkeler just add the source command to the mm.sh

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    Z 1 Reply Last reply Reply Quote 0
                    • Z Offline
                      Zinkeler @sdetweil
                      last edited by

                      @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.

                      S 1 Reply Last reply Reply Quote 1
                      • S Offline
                        sdetweil @Zinkeler
                        last edited by

                        @Zinkeler glad you go it!

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • S sdetweil has marked this topic as solved on
                        • 1 / 1
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy