TensorFlow-Object-Detection-on-the-Raspberry-Pi
TensorFlow-Object-Detection-on-the-Raspberry-Pi copied to clipboard
ImportError: /usr/local/lib/python3.7/dist-packages/cv2/cv2.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_fetch_add_8
Raspberry 4
python 3.7
tensorflow 2.0
i follow your guidence , and this issues happended at last ,
how should i do ?
rp3b+,same error.
Same error using Raspbian Buster
Tried this workaround:
$ LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1.2.0 python3 Object_detection_picamera.py --usbcam
Getting a new error now:
Traceback (most recent call last):
File "Object_detection_picamera.py", line 27, in <module>
import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'
Not sure if they are relevant.
Edit: Not relevant. The workaround should work.
Tried this workaround:
$ LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1.2.0 python3 Object_detection_picamera.py --usbcamGetting a new error now:
Traceback (most recent call last): File "Object_detection_picamera.py", line 27, in <module> import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow'Not sure if they are relevant.
Edit: Not relevant. The workaround should work.
No help..
Tried this workaround:
$ LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1.2.0 python3 Object_detection_picamera.py --usbcamGetting a new error now:
Traceback (most recent call last): File "Object_detection_picamera.py", line 27, in <module> import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow'Not sure if they are relevant. Edit: Not relevant. The workaround should work.
No help..
Getting the same error?
I'm seeing this as well.
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
i used another way to solve this issue yesterday, but it's not convenient
i first install opencv follow other guidence
https://www.pyimagesearch.com/2019/09/16/install-opencv-4-on-raspberry-pi-4-and-raspbian buster/ ,
then i skep the step of installing opencv in this guidence .
the result is i need to execute some extra code everytime i run the "Object_detection_picamera.py", they are :
- sudo find / -type f -name ‘atom.so*’
- LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1.2.0 python3 Object_detection_picamera.py
i tried your way today , and it did works .
thank you for taking the time to solve this issue @Zach-OP
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
thank you so much Zach-Op
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
When i try this, i get the error ''Could not install packages due to an EnvironmentError: 404 Client Error: Not found for url: https://pypi.org/simple/opencv-pyhton/''
Do you have any idea to achieve this problem?
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
NICE !!!
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
i have same error.. but is not helped. i try this solution and this. but also it doesnt work.. anybody plz help me 😭
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
it did work with previous versions of opencv.. thanks
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
Thank you so much! Worked like charm!
Thanks you so much @Zach-OP It really useful !!!
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python It gives me this when i install the older version
2020-02-09 05:51:42.552137: E tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load error: libhdfs.so: cannot open shared object file: No such file or directory
mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC
mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0x2948490 (ENOSPC)
mmal: mmal_connection_enable: output port couldn't be enabled
Traceback (most recent call last):
File "Object_detection_picamera.py", line 124, in
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
Thank you sooooooo much
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
It worked for me on RPI 3 B. It uninstalled my opencv_python-4.1.1.26 now it's ok with opencv-python==3.4.6.27. Thanks a lot !
rp3b+,same error.
Use OpenCV contrib with the right version.
pip install opencv-contrib-python==4.1.0.25
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
i excecuted the same python 3.4.6.27 was installed but againg showing the same error
Okay thank you very much! Have a great day!
On Sun, Feb 16, 2020, 1:16 AM modarm-e [email protected] wrote:
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
Thank you sooooooo much
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EdjeElectronics/TensorFlow-Object-Detection-on-the-Raspberry-Pi/issues/67?email_source=notifications&email_token=ANXCQKELI5E4DJX4YB2YJ6DRDDR53A5CNFSM4JPNARM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL37TKI#issuecomment-586676649, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANXCQKDEJXGAVBPC4243DL3RDDR53ANCNFSM4JPNARMQ .
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
it works well for me thanks
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python It gives me this when i install the older version
2020-02-09 05:51:42.552137: E tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load error: libhdfs.so: cannot open shared object file: No such file or directory mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0x2948490 (ENOSPC) mmal: mmal_connection_enable: output port couldn't be enabled Traceback (most recent call last): File "Object_detection_picamera.py", line 124, in camera = PiCamera() File "/usr/lib/python3/dist-packages/picamera/camera.py", line 433, in init self._init_preview() File "/usr/lib/python3/dist-packages/picamera/camera.py", line 513, in _init_preview self, self._camera.outputs[self.CAMERA_PREVIEW_PORT]) File "/usr/lib/python3/dist-packages/picamera/renderers.py", line 558, in init self.renderer.inputs[0].connect(source).enable() File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 2212, in enable prefix="Failed to enable connection") File "/usr/lib/python3/dist-packages/picamera/exc.py", line 184, in mmal_check raise PiCameraMMALError(status, prefix) picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources
Did you solve this? I have same issue
I tried Zac's approach to uninstall and then install OpenCV. I tried using LD_PRELOAD. I tried using VIRTUALWRAPPER_PYTHON. I tried mkvirtualenv cv2. None of them worked. I use Pi 4, 4GB and Intel Movidius NCS2, Python 3.7. Any other suggestions are much appreciated. This has taken much too much time to get resolved. Hopefully there is an easy solution. Many thanks, Martin from NZ
Hey, this is because the latest version of openCV doesn't work with RPi. Instead of pip3 install opencv-python try pip3 install opencv-python==3.4.6.27 You will need to uninstall the latest version first. pip3 uninstall opencv-python
thanks
I tried Zac's approach to uninstall and then install OpenCV. I tried using LD_PRELOAD. I tried using VIRTUALWRAPPER_PYTHON. I tried mkvirtualenv cv2. None of them worked. I use Pi 4, 4GB and Intel Movidius NCS2, Python 3.7. Any other suggestions are much appreciated. This has taken much too much time to get resolved. Hopefully there is an easy solution. Many thanks, Martin from NZ
I am also getting the same issue on rpi 4 . Someone plz help
I tried Zac's approach to uninstall and then install OpenCV. I tried using LD_PRELOAD. I tried using VIRTUALWRAPPER_PYTHON. I tried mkvirtualenv cv2. None of them worked. I use Pi 4, 4GB and Intel Movidius NCS2, Python 3.7. Any other suggestions are much appreciated. This has taken much too much time to get resolved. Hopefully there is an easy solution. Many thanks, Martin from NZ
Did you found any solution please post it
$ vi .bashrc (or nano .bashrc under root) add:export LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1 exit with save file. $ source .bashrc $ python3 Python 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
import cv2
It will work.
Update following @Zach-OP advice to stay away from the latest version: On a Pi4 today :
- OpenCV 4.1.1.26 KO
- OpenCV 4.1.0.25 imports properly and seems to run fine so far
=> Install with
pip3 install opencv-python==4.1.0.25