Failed to install v.2.0.0
grssll opened this issue · 88 comments
Fresh install on Bullseye 64 bit failed.
'''
verbose stack Error: command failed
305 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
305 verbose stack at ChildProcess.emit (node:events:513:28)
305 verbose stack at maybeClose (node:internal/child_process:1098:16)
305 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:304:5)
306 verbose pkgid mmm-face-reco-dnn@2.0.0
307 verbose cwd /home/grssl/MagicMirror/modules/MMM-Face-Reco-DNN
308 verbose Linux 6.1.21-v8+
309 verbose node v19.9.0
310 verbose npm v9.6.3
311 error code 1
312 error path /home/grssl/MagicMirror/modules/MMM-Face-Reco-DNN
313 error command failed
314 error command sh -c pipenv install --site-packages
315 verbose exit 1
316 timing npm Completed in 71476ms
317 verbose code 1
'''
mmm-face-reco-dnn@2.0.0 postinstall
pipenv install --site-packages
Installing dependencies from Pipfile.lock (972e4f)...
[pipenv.exceptions.InstallError]: Looking in indexes: https://pypi.org/simple, h ttps://www.piwheels.org/simple
[pipenv.exceptions.InstallError]: Collecting click==8.1.7 (from -r /tmp/pipenv-h 69qd4km-requirements/pipenv-6wj_7pay-hashed-reqs.txt (line 1))
[pipenv.exceptions.InstallError]: Using cached click-8.1.7-py3-none-any.whl (9 7 kB)
[pipenv.exceptions.InstallError]: Collecting dlib==19.24.2 (from -r /tmp/pipenv- h69qd4km-requirements/pipenv-6wj_7pay-hashed-reqs.txt (line 2))
[pipenv.exceptions.InstallError]: Using cached dlib-19.24.2.tar.gz (11.8 MB)
[pipenv.exceptions.InstallError]: Installing build dependencies: started
[pipenv.exceptions.InstallError]: Installing build dependencies: finished with status 'done'
[pipenv.exceptions.InstallError]: Getting requirements to build wheel: started
[pipenv.exceptions.InstallError]: Getting requirements to build wheel: finishe d with status 'done'
[pipenv.exceptions.InstallError]: Preparing metadata (pyproject.toml): started
[pipenv.exceptions.InstallError]: Preparing metadata (pyproject.toml): finishe d with status 'done'
[pipenv.exceptions.InstallError]: Collecting face-recognition==1.3.0 (from -r /t mp/pipenv-h69qd4km-requirements/pipenv-6wj_7pay-hashed-reqs.txt (line 3))
[pipenv.exceptions.InstallError]: Using cached https://www.piwheels.org/simple /face-recognition/face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
[pipenv.exceptions.InstallError]: Collecting face-recognition-models==0.3.0 (fro m -r /tmp/pipenv-h69qd4km-requirements/pipenv-6wj_7pay-hashed-reqs.txt (line 4))
[pipenv.exceptions.InstallError]: Using cached face_recognition_models-0.3.0.t ar.gz (100.1 MB)
[pipenv.exceptions.InstallError]: Preparing metadata (setup.py): started
[pipenv.exceptions.InstallError]: Preparing metadata (setup.py): finished with status 'done'
[pipenv.exceptions.InstallError]: Collecting numpy==1.25.2 (from -r /tmp/pipenv- h69qd4km-requirements/pipenv-6wj_7pay-hashed-reqs.txt (line 5))
[pipenv.exceptions.InstallError]: Using cached numpy-1.25.2-cp39-cp39-manylinu x_2_17_aarch64.manylinux2014_aarch64.whl (14.2 MB)
[pipenv.exceptions.InstallError]: Collecting opencv-python==4.8.0.74 (from -r /t mp/pipenv-h69qd4km-requirements/pipenv-6wj_7pay-hashed-reqs.txt (line 6))
[pipenv.exceptions.InstallError]: Using cached opencv_python-4.8.0.74-cp37-abi 3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (41.0 MB)
[pipenv.exceptions.InstallError]: Requirement already satisfied: picamera2==0.3. 12 in /usr/lib/python3/dist-packages (from -r /tmp/pipenv-h69qd4km-requirements/ pipenv-6wj_7pay-hashed-reqs.txt (line 7)) (0.3.12)
[pipenv.exceptions.InstallError]: Requirement already satisfied: pidng==4.0.9 in /usr/lib/python3/dist-packages (from -r /tmp/pipenv-h69qd4km-requirements/pipen v-6wj_7pay-hashed-reqs.txt (line 8)) (4.0.9)
[pipenv.exceptions.InstallError]: Requirement already satisfied: piexif==1.1.3 i n /usr/lib/python3/dist-packages (from -r /tmp/pipenv-h69qd4km-requirements/pipe nv-6wj_7pay-hashed-reqs.txt (line 9)) (1.1.3)
[pipenv.exceptions.InstallError]: Collecting pillow==10.0.0 (from -r /tmp/pipenv -h69qd4km-requirements/pipenv-6wj_7pay-hashed-reqs.txt (line 10))
[pipenv.exceptions.InstallError]: Using cached Pillow-10.0.0-cp39-cp39-manylin ux_2_28_aarch64.whl (3.2 MB)
[pipenv.exceptions.InstallError]: Collecting python-prctl==1.8.1 (from -r /tmp/p ipenv-h69qd4km-requirements/pipenv-6wj_7pay-hashed-reqs.txt (line 11))
[pipenv.exceptions.InstallError]: Using cached python-prctl-1.8.1.tar.gz (28 k B)
[pipenv.exceptions.InstallError]: Preparing metadata (setup.py): started
[pipenv.exceptions.InstallError]: Preparing metadata (setup.py): finished with status 'error'
[pipenv.exceptions.InstallError]: WARNING: Retrying (Retry(total=4, connect=None , read=None, redirect=None, status=None)) after connection broken by 'ProtocolEr ror('Connection aborted.', RemoteDisconnected('Remote end closed connection with out response'))': /simple/picamera2/
[pipenv.exceptions.InstallError]: error: subprocess-exited-with-error
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: × python setup.py egg_info did not run succe ssfully.
[pipenv.exceptions.InstallError]: │ exit code: 1
[pipenv.exceptions.InstallError]: ╰─> [1 lines of output]
[pipenv.exceptions.InstallError]: You need to install libcap development h eaders to build this module
[pipenv.exceptions.InstallError]: [end of output]
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: note: This error originates from a subproces s, and is likely not a problem with pip.
[pipenv.exceptions.InstallError]: error: metadata-generation-failed
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: × Encountered error while generating package m etadata.
[pipenv.exceptions.InstallError]: ╰─> See above for output.
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: note: This is an issue with the package mentio ned above, not pip.
[pipenv.exceptions.InstallError]: hint: See above for details.
ERROR: Couldn't install package: {}
Package installation failed...
/usr/lib/python3.9/subprocess.py:1052: ResourceWarning: subprocess 1644 is still running
_warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=4 encoding='utf-8' >
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=7 encoding='utf-8' >
ResourceWarning: Enable tracemalloc to get the object allocation traceback
npm ERR! code 1
npm ERR! path /home/grssl/MagicMirror/modules/MMM-Face-Reco-DNN
npm ERR! command failed
npm ERR! command sh -c pipenv install --site-packages
hi @grssll
sorry for the issues. seems there is a missing dependency you need to install. I tried so many things till it worked, seems i already had installed it.
sudo apt install -y libcap-dev
and after that
npm run postinstall
Maybe it happens that you have other missing dependencies, so please if so, tell me :) then i will add them to the install description
kind regards
Getting the same issue but it's moaning about opencv-python==4.8.0.74 and I can't get pip to install opencv-python==4.8.0.74, it just ends with 'killed' after collecting it. Pip also fails to install the latest version of opencv-python. Did the previous version of Face-Reco use opencv-python? I don't think so because it's not in my pip -list. I have the latest version of opencv installed as a .deb
My environment is as follows:
Python: 3.9.2
platform: Linux-6.1.21-v7+-armv7l-with-glibc2.31
glibc: glibc 2.31
machine: armv7l
bits: 32
pip: n/a
setuptools: 68.2.2
scikit-build: 0.17.6
PEP517_BUILD_BACKEND=setuptools.build_meta
hi @grssll sorry for the issues. seems there is a missing dependency you need to install. I tried so many things till it worked, seems i already had installed it.
sudo apt install -y libcap-dev
and after that
npm run postinstall
Maybe it happens that you have other missing dependencies, so please if so, tell me :) then i will add them to the install description
kind regards
Been sitting on installing dependencies from PIpfile.lock (972e4f) for a couple hours now.
No install. Pi froze after 3 hours and had to reboot. Tried again with the same result. Thanks
hi guys
i'm sorry that it is not working to install. Did you have enough cooling for your raspberry pi? Because this is a heavy library which need to compile first. It took also really long on my raspberry pi, but with a little bit extra air to the raspberry pi it worked.
It will do the same as in the old installation script of the previous version of my module, but "simply" over pip.
@ashbytaylors it was not installed via pip before, but should not make a difference. I will investigate if there are a more slim version of it that it goes smoother.
But in the meantime, can you try to cool down your raspberry pi more?
Sorry and kind regards
@nischi
Ice cooler with the fan set to turn on on 60. Fan is idle all the time.
Will try tonight 32bit OS
Hmmm strange. Btw: i do have also the 64bit OS, so this should actually work.
I have:
mmm-face-reco-dnn@2.0.0 postinstall
pipenv install --site-packages
Installing dependencies from Pipfile.lock (972e4f)...
and this freez your raspberry pi? Or is it still working?
Still working? but nothing changes in the terminal.
Stays on the same line
can you check the cpu usage? is it doing something?
24% cpu usage
yes one core is fully usaged, so seems he is working. cc1plus is the compiler to compiling the opencv. depending on the power of your raspberry pi, it can take a long time
Pi4 4gb
yeah this is great, but still take a while :)
I will investigate that we can use a more slim library
Sat there for 5 hours nothing changed and froze again.
mmm-face-reco-dnn@2.0.0 postinstall
pipenv install --site-packages
Creating a virtualenv for this project...
Pipfile: /home/grssl/MagicMirror/modules/MMM-Face-Reco-DNN/Pipfile
Using /usr/bin/python3.9 (3.9.2) to create virtualenv...
Making site-packages available...
⠏ Creating virtual environment...created virtual environment CPython3.9.2.final. 0-64 in 2351ms
creator CPython3Posix(dest=/home/grssl/.local/share/virtualenvs/MMM-Face-Reco- DNN-XqMQwW8X, clear=False, no_vcs_ignore=False, global=True)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle , via=copy, app_data_dir=/home/grssl/.local/share/virtualenv)
added seed packages: pip==23.2.1, setuptools==68.2.0, wheel==0.41.2
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerS hellActivator,PythonActivator
✔ Successfully created virtual environment!
Virtualenv location: /home/grssl/.local/share/virtualenvs/MMM-Face-Reco-DNN-XqMQ wW8X
Installing dependencies from Pipfile.lock (972e4f)...
Tried on new install. After about 15min freezes and not responds.
I have:
mmm-face-reco-dnn@2.0.0 postinstall
pipenv install --site-packages
Installing dependencies from Pipfile.lock (972e4f)...
I'm stuck at the start as well.
magicmirror@pi:~ $ cd /MagicMirror/modules/MagicMirror/modules $ cd MMM-Face-Reco-DNN
magicmirror@pi:
magicmirror@pi:~/MagicMirror/modules/MMM-Face-Reco-DNN $ npm install
mmm-face-reco-dnn@2.0.0 postinstall
pipenv install --site-packages
Installing --site-packages…
⠋WARNING: Expected package name at the start of dependency specifier
--site-packages
^
ABORTING INSTALL... You will have to reinstall any packages that failed to install.
You may have to manually run pipenv lock when you are finished.
npm ERR! code 1
npm ERR! path /home/magicmirror/MagicMirror/modules/MMM-Face-Reco-DNN
npm ERR! command failed
npm ERR! command sh -c pipenv install --site-packages
npm ERR! A complete log of this run can be found in: /home/magicmirror/.npm/_logs/2023-10-04T00_23_48_590Z-debug-0.log
mmm-face-reco-dnn@2.0.0 postinstall
pipenv install --site-packagesCreating a virtualenv for this project... Pipfile: /home/grssl/MagicMirror/modules/MMM-Face-Reco-DNN/Pipfile Using /usr/bin/python3.9 (3.9.2) to create virtualenv... Making site-packages available... ⠏ Creating virtual environment...created virtual environment CPython3.9.2.final. 0-64 in 2351ms creator CPython3Posix(dest=/home/grssl/.local/share/virtualenvs/MMM-Face-Reco- DNN-XqMQwW8X, clear=False, no_vcs_ignore=False, global=True) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle , via=copy, app_data_dir=/home/grssl/.local/share/virtualenv) added seed packages: pip==23.2.1, setuptools==68.2.0, wheel==0.41.2 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerS hellActivator,PythonActivator
✔ Successfully created virtual environment! Virtualenv location: /home/grssl/.local/share/virtualenvs/MMM-Face-Reco-DNN-XqMQ wW8X Installing dependencies from Pipfile.lock (972e4f)...
Tried on new install. After about 15min freezes and not responds.
What do you meen with freez? Is the whole system hanging?
I have:
mmm-face-reco-dnn@2.0.0 postinstall
pipenv install --site-packages
Installing dependencies from Pipfile.lock (972e4f)...I'm stuck at the start as well.
magicmirror@pi:~ $ cd
/MagicMirror/modules magicmirror@pi:/MagicMirror/modules $ cd MMM-Face-Reco-DNN magicmirror@pi:~/MagicMirror/modules/MMM-Face-Reco-DNN $ npm installmmm-face-reco-dnn@2.0.0 postinstall
pipenv install --site-packagesInstalling --site-packages… ⠋WARNING: Expected package name at the start of dependency specifier --site-packages ^ ABORTING INSTALL... You will have to reinstall any packages that failed to install. You may have to manually run pipenv lock when you are finished. npm ERR! code 1 npm ERR! path /home/magicmirror/MagicMirror/modules/MMM-Face-Reco-DNN npm ERR! command failed npm ERR! command sh -c pipenv install --site-packages
npm ERR! A complete log of this run can be found in: /home/magicmirror/.npm/_logs/2023-10-04T00_23_48_590Z-debug-0.log
which version of pip and pipenv did you have?
@nischi
Yes, Pi not responding and I need to remove power to reboot.
Tried few times with the same result.
Thanks
i need to reset my pi again and will try it also. will keep you posted.
nodejs: 20.8.0
pip: 20.3.4 , Python 3.9
pipenv: 2023.10.3
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 6.1.21-v8+
Architecture: arm64
I've given up trying to install opencv via PIP on a Pi3B. It never completes the compile (gets killed) or hangs the machine after a few hours. However sudo apt-get install python3-opencv installs the necessary libraries etc.
How do I either get the latest version of Face-Reco to use this OR revert back to the previous version of Face-Recp so that I can get it working on my Pi3B again?
i need to reset my pi again and will try it also. will keep you posted.
Did you had a time to try and find out whats causing the crash?
Cheers
I've given up trying to install opencv via PIP on a Pi3B. It never completes the compile (gets killed) or hangs the machine after a few hours. However sudo apt-get install python3-opencv installs the necessary libraries etc. How do I either get the latest version of Face-Reco to use this OR revert back to the previous version of Face-Recp so that I can get it working on my Pi3B again?
hi @ashbytaylors
sorry for the issues. you can simply checkout an older tag of my repo.
Got this as well on Bullseye.
pi@rpi4b01:/tmp/MMM-Face-Reco-DNN $ npm install
> mmm-face-reco-dnn@2.0.0 postinstall
> pipenv install --site-packages
Installing --site-packages…
⠋WARNING: Parse error at "'--site-p'": Expected W:(0-9A-Za-z)
ABORTING INSTALL... You will have to reinstall any packages that failed to install.
You may have to manually run pipenv lock when you are finished.
npm ERR! code 1
npm ERR! path /tmp/MMM-Face-Reco-DNN
npm ERR! command failed
npm ERR! command sh -c pipenv install --site-packages
Got this as well on Bullseye.
pi@rpi4b01:/tmp/MMM-Face-Reco-DNN $ npm install > mmm-face-reco-dnn@2.0.0 postinstall > pipenv install --site-packages Installing --site-packages… ⠋WARNING: Parse error at "'--site-p'": Expected W:(0-9A-Za-z) ABORTING INSTALL... You will have to reinstall any packages that failed to install. You may have to manually run pipenv lock when you are finished. npm ERR! code 1 npm ERR! path /tmp/MMM-Face-Reco-DNN npm ERR! command failed npm ERR! command sh -c pipenv install --site-packages
pipenv
package provided in Debian Bullseye is too old and does not support the --site-packages
option, I installed pipenv
via pip
and it fixed my previous issue.
I was able to install the module on RPi 4B (I first created a wheel file for dlib
):
apt install npm python3-pip libcap-dev
python -m venv ~/.virtualenvs/facerecodnn
. ~/.virtualenvs/facerecodnn/bin/activate
pip install pipenv
curl -O --output-dir /tmp https://whl.smartgic.io/dlib-19.24.2-cp39-cp39-linux_aarch64.whl
git clone https://github.com/nischi/MMM-Face-Reco-DNN.git
cd MMM-Face-Reco-DNN
sed -i 's|dlib = "\*"|dlib = {path = "/tmp/dlib-19.24.2-cp39-cp39-linux_aarch64.whl"}|g' Pipfile
npm install
Output:
> mmm-face-reco-dnn@2.0.0 postinstall
> pipenv install --site-packages
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Pipfile.lock not found, creating...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success!
Locking [dev-packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success!
Updated Pipfile.lock (e4955206bf2bd75367a77d54d54c936c53e149312b74fa901565ef0bc871f1ff)!
Installing dependencies from Pipfile.lock (71f1ff)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
up to date, audited 229 packages in 41s
105 packages are looking for funding
run `npm fund` for details
I hope it helps.
I did this:
(facerecodnn) magicmirror@pi:~ $ apt install npm python3-pip libcap-dev
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
(facerecodnn) magicmirror@pi:~ $ sudo apt install npm python3-pip libcap-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libcap-dev is already the newest version (1:2.44-1).
python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libnode72 : Conflicts: nodejs-legacy
nodejs : Conflicts: npm
E: Unable to correct problems, you have held broken packages.
How do I fix this?
Note: just an ordinary dude who tries to follow instructions. Not a coder/programmer at all... Had some experience with config/modules and that's about it.
Hi @mikecheng2626
can you tell me which version of npm and node do you have?
you can run
npm -v
node -v
just a note.. the latest MM requires node 18 or 20 (for the internal fetch)
Hi @mikecheng2626 can you tell me which version of npm and node do you have?
you can run
npm -v
node -v
Yes!
npm is 9.6.7
node is v18.17.1
@mikecheng2626 you already have npm installed, so shouldn't try to install it again
installing node 18 or 20 is a nightmare as they changed the process too.
my mm install script handles node and npm using the n command. (not apt) and does all the work.
@grssll
I'm so sorry, not yet. My other Projects need a lot of time at the moment. I will try as fast as possible. Hopefully this weekend.
@mikecheng2626 you already have npm installed, so shouldn't try to install it again
installing node 18 or 20 is a nightmare as they changed the process too.
my mm install script handles node and npm using the n command. (not apt) and does all the work.
@sdetweil I'm sorry for being stupid, but could you elaborate on the n command? I'm literally a noobie on this, just trying to build my first magic mirror.
@mikecheng2626 one can install node and npm system wide. but there are sometimes application conflicts between versions
another app was created nvm (node version manager) which allows you to select a version of node by command prompt and thus application
NVM is installed with apt-get
someone decide that the apt install is too restrictive on many platforms, so they created another new app, n , which is installed thru npm.
because my install script runs in many places, and has to deal with different collections of dependencies, aptget for another tool is difficult.
and the problems with node 18 and 20 using apt are impossible to resolve. I switched to using n.
both nvm and n install the version of node in /usr/local/bin, while apt installs in /usr/bin
/usr/local/bin is searched first..
if n is installed, u can see the versions available and which one is active. if started w sudo, you can change versions on the fly too
sorry but any update on this I am having the same issue keeps failing I have tried both bookworm 64bit and bullseye 64bit and have been unable to get this module working.
thanks in advanced
Hi all
I tried now to install it from scratch and i strugle now also a little bit, specially with venv. I will keep you posted as i do have a solution.
@grssll
I strugle now with the pipenv lock file. It's strange but they seems to update something with python and venv. I can skip it and then it works and i also updated the depenencies to opencv headless, which is kind of working. But need to check also with the real webcam.
So i installed the whole raspberry many times now and it seems to work, but didn't have time to test it till the end.
If you have time and wanna test also a little you can try my branch.
https://github.com/nischi/MMM-Face-Reco-DNN/tree/bugfix/install-issues
Otherwise i will keep you postet if i successfully test everything.
@mikecheng2626 one can install node and npm system wide. but there are sometimes application conflicts between versions
another app was created nvm (node version manager) which allows you to select a version of node by command prompt and thus application
NVM is installed with apt-get
someone decide that the apt install is too restrictive on many platforms, so they created another new app, n , which is installed thru npm.
because my install script runs in many places, and has to deal with different collections of dependencies, aptget for another tool is difficult.
and the problems with node 18 and 20 using apt are impossible to resolve. I switched to using n.
both nvm and n install the version of node in /usr/local/bin, while apt installs in /usr/bin
/usr/local/bin is searched first..
if n is installed, u can see the versions available and which one is active. if started w sudo, you can change versions on the fly too
Thank you for your explanation. I will see into it.
this still seemed to fail for me .. maybe it's just me ...
admin@rpi4-mm:/MagicMirror/modules $ nvm install --lts/MagicMirror/modules $ node -v
Installing latest LTS version.
Downloading and installing node v20.9.0...
Downloading https://nodejs.org/dist/v20.9.0/node-v20.9.0-linux-arm64.tar.xz...
############################################################################################################################################################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v20.9.0 (npm v10.1.0)
Creating default alias: default -> lts/* (-> v20.9.0)
admin@rpi4-mm:
v20.9.0
admin@rpi4-mm:/MagicMirror/modules $ sudo apt install python3-pip/MagicMirror/modules $ sudo apt install pipenv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
admin@rpi4-mm:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
pipenv is already the newest version (11.9.0-1.1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
admin@rpi4-mm:/MagicMirror/modules $ git clone https://github.com/nischi/MMM-Face-Reco-DNN.git/MagicMirror/modules $ cd MMM-Face-Reco-DNN
Cloning into 'MMM-Face-Reco-DNN'...
remote: Enumerating objects: 666, done.
remote: Counting objects: 100% (309/309), done.
remote: Compressing objects: 100% (120/120), done.
remote: Total 666 (delta 241), reused 240 (delta 188), pack-reused 357
Receiving objects: 100% (666/666), 1.18 MiB | 3.08 MiB/s, done.
Resolving deltas: 100% (412/412), done.
admin@rpi4-mm:
npm install
mmm-face-reco-dnn@2.0.0 postinstall
pipenv install --site-packages
Installing --site-packages…
⠋WARNING: Parse error at "'--site-p'": Expected W:(abcd...)
ABORTING INSTALL... You will have to reinstall any packages that failed to install.
You may have to manually run pipenv lock when you are finished.
npm ERR! code 1
npm ERR! path /home/admin/MagicMirror/modules/MMM-Face-Reco-DNN
npm ERR! command failed
npm ERR! command sh -c pipenv install --site-packages
npm ERR! A complete log of this run can be found in: /home/admin/.npm/_logs/2023-10-25T02_11_50_567Z-debug-0.log
admin@rpi4-mm:~/MagicMirror/modules/MMM-Face-Reco-DNN $ npm -v
10.1.0
Hi @marivan38
Seems you did not use my other branch where i'm testing. Because the install command is a little bit different. It is not yet deployed, i need to test it further. But who wants can use my branch https://github.com/nischi/MMM-Face-Reco-DNN/tree/bugfix/install-issues to test it as well
@grssll
It took around 15 minutes to compile and install everything with the npm ci
command. I tried on my raspberry pi 4
An error occurred while installing v4l2-python3==0.3.2 --hash=sha256:34737ac0ef5bd3167d29379276e0881f6e0539db9e3e881a5df7cbec6c264391 --hash=sha256:b7ae81ce7e2908498bd7e9bb978d5ed9ab70c12ba79c45ddda65d0a302422f9f! Will try again.
Installing initially failed dependencies...
Package installation failed...
npm ERR! code 1
npm ERR! path /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN
npm ERR! command failed
npm ERR! command sh -c pipenv install --site-packages
npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-10-25T10_06_23_908Z-debug-0.log
@grssll
but also on your side the error tell me you do not use my branch. As you can see here, i changed the install command.
master...bugfix/install-issues
it is pipenv install --skip-lock
instead of pipenv install --site-packages
.
But in your error message they tell
npm ERR! command sh -c pipenv install --site-packages
This is what I did:
cd ~/MagicMirror/modules/
git clone -b bugfix/install-issues https://github.com/nischi/MMM-Face-Reco-DNN.git
cd MMM-Face-Reco-DNN
npm ci
mmm-face-reco-dnn@2.0.0 postinstall
pipenv install --skip-lock
Installing dependencies from Pipfile...
Waited for 30min. Pi worked hard with the fan on full but stuck on above.
@grssll
Which Pi do you have? i tried it with my Pi 4 8GB today and it took 15 minutes and complete successfully.
What do you mean with stuck? is the still working on it or is he hanging? Because yes, it take a while
@nischi,
Pi4 4gb.
OS Bookworm wont install at all.
OS Bullseye see photo below. This is as far as it goes and freezes.
@grssll
Did you do a fresh install? Because you have not the actual python version.
Not sure if this an issue. I do have after a clean installation of bullseye and an upgrade.
python 3.11
pip 23.0.1
pipenv 2022.12.19
setuptools 66.1.1
so a few major versions ahead of you. Is it possible that you can try to upgrade everything and try again or is it breaking something else maybe?
Sorry to ask you that, but i have no clue what it could be else.
Hi @nischi ,
When you have time can you test it on default 64bit Bullseye OS with python 3.9.2 ?
Thank you
Do you have the command for logitech webcam? I'm not using a picamera. I think that's the only thing I'm having trouble.
@grssll
I will give a try, sure.
@mikecheng2626
I'm using the picamera2 library. Which says that they are compatible with the most webcams, also not picam. But an official supported device list is not existing. What kind of trouble do you have?
It says I don't have picamera lol... cuz I'm using a C270 webcam right now
@mikecheng2626
this looks correct yes. you do not need to activate it to install again. but you have no errors. But you told me above that it says "you have no picam" where do you got this error? While installation?
@mikecheng2626
Could you please explain step by step how did you get the module installed.
I cant get past "installing dependecies" in my pi.
Thanks
@grssll
It is not that easy to downgrade from 3.11. If i do a fresh install from raspberry pi os i get python 3.11 as default. Can you try to update and try to run the install script again?
@nischi
I have installed fresh Bullseye 32 and 64 bit from Pi imager and they all come wtih python 3.9.
How is it possible that yours comes with 3.11? Is yours Bookworm OS?
Cheers
oh dear, you are right, i do have bookworm. I choosed simply the raspberry pi os 64 bit. thought that is bullseye. i'm very sorry. but i will try with bullseye now
@grssll
it run through with bullseye and 3.9, but it fails with some compile issues. i will try now 3.10 and 3.11.
@grssll it run through with bullseye and 3.9, but it fails with some compile issues. i will try now 3.10 and 3.11.
Are you using master or bugfix? Thanks
> mmm-face-reco-dnn@2.0.0 postinstall
> pipenv install --skip-lock
Creating a virtualenv for this project...
Pipfile: /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/Pipfile
Using /usr/bin/python3 (3.11.2) to create virtualenv...
⠏ Creating virtual environment...created virtual environment CPython3.11.2.final.0-64 in 397ms
creator CPython3Posix(dest=/home/pi/.local/share/virtualenvs/MMM-Face-Reco-DNN-CBH8IAb2, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/pi/.local/share/virtualenv)
added seed packages: pip==23.0.1, setuptools==66.1.1, wheel==0.38.4
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
✔ Successfully created virtual environment!
Virtualenv location: /home/pi/.local/share/virtualenvs/MMM-Face-Reco-DNN-CBH8IAb2
Installing dependencies from Pipfile...
An error occurred while installing face-recognition! Will try again.
An error occurred while installing numpy! Will try again.
An error occurred while installing opencv-python-headless! Will try again.
An error occurred while installing dlib! Will try again.
An error occurred while installing libpcap! Will try again.
An error occurred while installing picamera2! Will try again.
Installing initially failed dependencies...
Failed to install some dependency or packages. The following have failed installation and attempted retry: [Requirement(_name='face-recognition', vcs=None, req=NamedRequirement(name='face-recognition', version='', req=Requirement.parse('face-recognition'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=face-recognition, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=face-recognition)>), markers=None, _specifiers='', index=None, editable=False, hashes=frozenset(), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=face-recognition, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=face-recognition)>, _ireq=None), Requirement(_name='numpy', vcs=None, req=NamedRequirement(name='numpy', version='', req=Requirement.parse('numpy'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=numpy, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=numpy)>), markers=None, _specifiers='', index=None, editable=False, hashes=frozenset(), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=numpy, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=numpy)>, _ireq=None), Requirement(_name='opencv-python-headless', vcs=None, req=NamedRequirement(name='opencv-python-headless', version='', req=Requirement.parse('opencv-python-headless'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=opencv-python-headless, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=opencv-python-headless)>), markers=None, _specifiers='', index=None, editable=False, hashes=frozenset(), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=opencv-python-headless, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=opencv-python-headless)>, _ireq=None), Requirement(_name='dlib', vcs=None, req=NamedRequirement(name='dlib', version='', req=Requirement.parse('dlib'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=dlib, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=dlib)>), markers=None, _specifiers='', index=None, editable=False, hashes=frozenset(), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=dlib, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=dlib)>, _ireq=None), Requirement(_name='libpcap', vcs=None, req=NamedRequirement(name='libpcap', version='', req=Requirement.parse('libpcap'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=libpcap, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=libpcap)>), markers=None, _specifiers='', index=None, editable=False, hashes=frozenset(), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=libpcap, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=libpcap)>, _ireq=None), Requirement(_name='picamera2', vcs=None, req=NamedRequirement(name='picamera2', version='', req=Requirement.parse('picamera2'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=picamera2, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=picamera2)>), markers=None, _specifiers='', index=None, editable=False, hashes=frozenset(), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=picamera2, path=None, uri=None, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=picamera2)>, _ireq=None)]
npm ERR! code 1
npm ERR! path /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN
npm ERR! command failed
npm ERR! command sh -c pipenv install --skip-lock
npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-10-30T08_13_11_439Z-debug-0.log
@grssll it run through with bullseye and 3.9, but it fails with some compile issues. i will try now 3.10 and 3.11.
Are you using master or bugfix? Thanks
I'm using bugfix
@grssll
It seems pipenv has some issues to install this dependencies. If i do it complete without pipenv, it works fine. Not sure which package is not working properly. But i tried now everything without pipenv and now it installed smooth on bullseye with python 3.9.
I changed the readme with the install instructions. Now i need to test it also with Bookworm and with a real camera.
changed the readme with the install instructions
and chance you could make a script to do that instead of users having to figure it out too...
npm has a preinstall and postinstall step you can provide scripts to
@sdetweil
I know, that's what i removed, because it didn't work with pipenv. Maybe i need to create a own install script. But for the meantime it is removed, till i get the module working properly.
ok, git it..
Bullseye 64bit went smooth. Will see how camera works.
Bookworm 64bit fails on ''install python dependecies''
How does it fail? I had also some issues because this virtual environment stuff from python (not pipenv). And i extended the readme a little bit to create first a virtual environment and this worked then for me well
How does it fail? I had also some issues because this virtual environment stuff from python (not pipenv). And i extended the readme a little bit to create first a virtual environment and this worked then for me well
New docs works for the install but then when I'm trying to encode:
pi@raspberrypi:~/MagicMirror/modules/MMM-Face-Reco-DNN/tools $ npm run encode
> mmm-face-reco-dnn@2.0.0 encode
> python tools/encode.py -i dataset -e model/encodings.pickle
Traceback (most recent call last):
File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/encode.py", line 2, in <module>
import face_recognition
ModuleNotFoundError: No module named 'face_recognition'
@mikecheng2626 Could you please explain step by step how did you get the module installed. I cant get past "installing dependecies" in my pi. Thanks
I just followed your commands:
cd ~/MagicMirror/modules/
git clone -b bugfix/install-issues https://github.com/nischi/MMM-Face-Reco-DNN.git
cd MMM-Face-Reco-DNN
npm ci
1st time I did it, it mentioned error and said there was no picamera detected
2nd time I did it again, it didn't say that anymore
@grssll
i changed the install script again a little bit. You need to activate your virtual envornment of course. Sorry i missed this.
But i found another issue that picamera from the virtual environment a library use which is not existing in pip. i will figure this out
@grssll
I update again the install script and it works now for me with a virtual environment. I only need to test it with a real picamera and if this is working i think i can release the new version. If you wanna and have time, you can test it as well.
Thanks a lot for your support, it helped a lot. I hope it will work now for everybody.
@nischi
It worked flawlessly for me on a newly installed 64-bit version of Bookworm on a Raspberry Pi 4GB with a real picamera. Remember to configure the PythonPath in the module-config. Thank you all!
@nischi
Tried on both legacy and new 64bit. All went well. Camera module v2 works. Ordered to test module v3.
Thanks for all the work you did for the community. Can I buy you a couple coffee's as appreciation?
Thanks
Hi all just a quick question at one point it was asking for the face_recognition when trying to encode and I manually installed it.. is that now part of the install script? I am planning on wiping and starting from scratch again and I don't use a virtual environment and it seemed to work well with the 64bit bookworm OS.
Thanks in advanced
@grssll
Thank you very much for your testing. Happy to hear that it worked. I will try with my camera today as well, but if you say it works it should work. Btw: i do have a pi camera v3. So i will test it :)
Thank you for your offer, but it's fine, thank you very much :)
@marivan28
with the next version i release it will not have an install-script anymore. because with pipenv it was not working properly. so you need to install it manually. But i will have a short install description in the readme.
For me in bookworm os it forced me to use an virtual envornment, or i disable the whole mechanism. But also this will be part of the install script.