Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting DEPRECATION: python-prctl when installed DEPRECATION: python-prctl and ImportError: libopenblas.so.0: when ran ImportError: libopenblas.so.0: #154

Open
razibulislam opened this issue May 3, 2024 · 5 comments

Comments

@razibulislam
Copy link

razibulislam commented May 3, 2024

Hello Sir I am getting some error: Logs are below:
System information: Raspberry Pi 4B 4 gb ram Bookworm 32 bit:

Please let me know if I am doing something wrong.

sumon@mmirror:~ $ python3 -m venv /python-facereco
sumon@mmirror:
$ source /python-facereco/bin/activate
(python-facereco) sumon@mmirror:
$ pip install face-recognition numpy dlib picamera2 opencv-python
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting face-recognition
Downloading https://www.piwheels.org/simple/face-recognition/face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
Collecting numpy
Downloading https://www.piwheels.org/simple/numpy/numpy-1.26.4-cp311-cp311-linux_armv7l.whl (5.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 3.4 MB/s eta 0:00:00
Collecting dlib
Downloading https://www.piwheels.org/simple/dlib/dlib-19.24.4-cp311-cp311-linux_armv7l.whl (3.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 6.1 MB/s eta 0:00:00
Collecting picamera2
Downloading https://www.piwheels.org/simple/picamera2/picamera2-0.3.18-py3-none-any.whl (76 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.0/77.0 kB 25.1 kB/s eta 0:00:00
Collecting opencv-python
Downloading opencv-python-4.9.0.80.tar.gz (92.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.9/92.9 MB 1.0 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting face-recognition-models>=0.3.0
Downloading https://www.piwheels.org/simple/face-recognition-models/face_recognition_models-0.3.0-py2.py3-none-any.whl (100.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.6/100.6 MB 528.5 kB/s eta 0:00:00
Collecting Click>=6.0
Downloading https://www.piwheels.org/simple/click/click-8.1.7-py3-none-any.whl (97 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 331.1 kB/s eta 0:00:00
Collecting Pillow
Downloading https://www.piwheels.org/simple/pillow/pillow-10.3.0-cp311-cp311-linux_armv7l.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 1.4 MB/s eta 0:00:00
Collecting PiDNG
Downloading https://www.piwheels.org/simple/pidng/pidng-4.0.9-cp311-cp311-linux_armv7l.whl (52 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 52.3/52.3 kB 1.5 MB/s eta 0:00:00
Collecting piexif
Downloading https://www.piwheels.org/simple/piexif/piexif-1.1.3-py2.py3-none-any.whl (20 kB)
Collecting simplejpeg
Downloading https://www.piwheels.org/simple/simplejpeg/simplejpeg-1.7.2-cp311-cp311-linux_armv7l.whl (323 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 323.2/323.2 kB 2.1 MB/s eta 0:00:00
Collecting v4l2-python3
Downloading https://www.piwheels.org/simple/v4l2-python3/v4l2_python3-0.3.4-py3-none-any.whl (22 kB)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/python-prctl/
Collecting python-prctl
Downloading python-prctl-1.8.1.tar.gz (28 kB)
Preparing metadata (setup.py) ... done
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/av/
Collecting av
Downloading https://www.piwheels.org/simple/av/av-12.0.0-cp311-cp311-linux_armv7l.whl (9.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.2/9.2 MB 1.6 MB/s eta 0:00:00
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (pyproject.toml) ... done
Created wheel for opencv-python: filename=opencv_python-4.9.0.80-cp311-cp311-linux_armv7l.whl size=13264182 sha256=817a6e873e67398604ac68b86a77134892d5eb9654dd5c6736dc8274c4363a82
Stored in directory: /home/sumon/.cache/pip/wheels/66/42/68/6dcd57c4b931ac919ae69acfac8517255644f88c8c3ba4e14b
Successfully built opencv-python
Installing collected packages: v4l2-python3, python-prctl, face-recognition-models, dlib, Pillow, piexif, numpy, Click, av, simplejpeg, PiDNG, opencv-python, face-recognition, picamera2
DEPRECATION: python-prctl is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559
Running setup.py install for python-prctl ... done
Successfully installed Click-8.1.7 PiDNG-4.0.9 Pillow-10.3.0 av-12.0.0 dlib-19.24.4 face-recognition-1.3.0 face-recognition-models-0.3.0 numpy-1.26.4 opencv-python-4.9.0.80 picamera2-0.3.18 piexif-1.1.3 python-prctl-1.8.1 simplejpeg-1.7.2 v4l2-python3-0.3.4
(python-facereco) sumon@mmirror:~ $ nano /python-facereco/pyvenv.cfg
(python-facereco) sumon@mmirror:
$ cd /MagicMirror/modules/
(python-facereco) sumon@mmirror:
/MagicMirror/modules $ git clone https://github.com/nischi/MMM-Face-Reco-DNN.git
Cloning into 'MMM-Face-Reco-DNN'...
remote: Enumerating objects: 680, done.
remote: Counting objects: 100% (323/323), done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 680 (delta 250), reused 290 (delta 228), pack-reused 357
Receiving objects: 100% (680/680), 1.18 MiB | 3.79 MiB/s, done.
Resolving deltas: 100% (421/421), done.
(python-facereco) sumon@mmirror:/MagicMirror/modules $ cd MMM-Face-Reco-DNN
(python-facereco) sumon@mmirror:
/MagicMirror/modules/MMM-Face-Reco-DNN $ npm install

added 228 packages, and audited 229 packages in 9s

105 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
(python-facereco) sumon@mmirror:/MagicMirror/modules/MMM-Face-Reco-DNN $ cd tools
(python-facereco) sumon@mmirror:
/MagicMirror/modules/MMM-Face-Reco-DNN/tools $ npm run encode

[email protected] encode
python tools/encode.py -i dataset -e model/encodings.pickle

Traceback (most recent call last):
File "/home/sumon/MagicMirror/modules/MMM-Face-Reco-DNN/tools/encode.py", line 2, in
import face_recognition
File "/home/sumon/python-facereco/lib/python3.11/site-packages/face_recognition/init.py", line 7, in
from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
File "/home/sumon/python-facereco/lib/python3.11/site-packages/face_recognition/api.py", line 4, in
import dlib
File "/home/sumon/python-facereco/lib/python3.11/site-packages/dlib/init.py", line 19, in
from _dlib_pybind11 import *
ImportError: libopenblas.so.0: cannot open shared object file: No such file or d(py((p(python-(python-facerec((p(python-facerec(pyth((py(py(((python-facereco) sumon@mmirror:~/MagicMirror/modules/MMM-Face-Reco-DNN/tools $ ^C

Also tried to run the encode deactivating the virtual environment:
sumon@mmirror:~/MagicMirror/modules/MMM-Face-Reco-DNN/tools $ npm run encode

[email protected] encode
python tools/encode.py -i dataset -e model/encodings.pickle

Traceback (most recent call last):
File "/home/sumon/MagicMirror/modules/MMM-Face-Reco-DNN/tools/encode.py", line 2, in
import face_recognition
ModuleNotFoundError: No module named 'face_recognition'

Kind regards,

Razibul

@nischi
Copy link
Owner

nischi commented May 6, 2024

Hi @razibulislam
This sounds more like an error withing face_recognition module which was installed with pip.
Properbly justadudewhohacks/face-recognition.js#43

Which version of node do you use?

@razibulislam
Copy link
Author

Hi @razibulislam This sounds more like an error withing face_recognition module which was installed with pip. Properbly justadudewhohacks/face-recognition.js#43

Which version of node do you use?
sumon@mmirror:~ $ node -v
v22.1.0

@nischi
Copy link
Owner

nischi commented May 7, 2024

I use the LTS version. can you try version 20? Not sure if this helps.

@razibulislam
Copy link
Author

I use the LTS version. can you try version 20? Not sure if this helps.

I have tried with LTS v 20. Here is what I am getting:
error message:

    File "setup.py", line 267, in main
      setup(
    File "/tmp/pip-build-env-d4atuz_c/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 706, in setup
      _classify_installed_files(
    File "setup.py", line 411, in _classify_installed_files_override
      with open(config_py, 'w') as opencv_init_config:
           ^^^^^^^^^^^^^^^^^^^^

### **FileNotFoundError: [Errno 2] No such file or directory: '_skbuild/linux-aarch64-3.11/cmake-install/python/cv2/config-3.py'

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects**

@razibulislam
Copy link
Author

I have tried with LTS v 20. Here is what I am getting:
error message:
File "/tmp/pip-build-env-d4atuz_c/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 706, in setup
_classify_installed_files(
File "setup.py", line 411, in _classify_installed_files_override
with open(config_py, 'w') as opencv_init_config:
^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '_skbuild/linux-aarch64-3.11/cmake-install/python/cv2/config-3.py'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants