Segmentation fault after installing mediapipe on raspberry pi 3 model b - python-3.7

After updating numpy to its latest version I tried to install mediapipe on my raspberry pi 3 model b with following instructions found in here...
sudo apt install ffmpeg python3-opencv python3-pip
sudo apt install libxcb-shm0 libcdio-paranoia-dev libsdl2-2.0-0 libxv1 libtheora0 libva-drm2 libva-x11-2 libvdpau1 libharfbuzz0b libbluray2 libatlas-base-dev libhdf5-103 libgtk-3-0 libdc1394-22 libopenexr23
sudo pip3 install mediapipe-rpi3
After getting the successful installed massage on all of the above packages, I tried to import mediapipe in python3 but I get this message:
Segmentation fault
After this message python quits automatically.
Even when I wanted to import opencv I get the same message again, but any other packages like numpy, os and ... work fine. Can someone help?
Note: I installed the latest version of raspberry pi os from here and I installed Raspberry Pi OS (Legacy) version.

Related

LLVM downloads 11 to environment

Best regards
i need to download librosa to raspberry pi so first of all i downloaded virtualenv and created environment and installed llvm with:
sudo apt-get install llvm
pip3 install llvmlite==0.37
pip3 install librosa=0.6.3
then tried to import a librosa in abc.py file. execution output is:
importerror-numpy-core-multiarray-failed-to-import
changing the numpy version didin't help output evolved:
numba 0.55 requires numpy 1.22
tried to change numba version but it didin't help either
anyway...
everyone installed llvm version 7 for librosa but my version is 11. I couldn't find the download with version. I've tried:
sudo apt-get install llvm-7.0
Librosa and numpy does not work well in llvm11.
how can i download version 7?
Thanks for advices

python2.7 in Raspbian Lite

I have installed Raspbian Lite OS in Raspberry Pi zero.
I found that Raspbian Lite comes with Python3 as default.
But I am gonna run some scripts that uses libraries that are Python2 Compatible.
So I tried to change the default Python version from Python3 to Python2 (Specifically Python2.7.18)
After so much searching and trying, instructions from [this page][1] made my job
Now if I try to check in command writing
python --version
It shows me that it is Python2.7.18
But the problem is I am not being able to install any packages using
sudo apt-get install <python-packagename>
It shows me Errors like
1.Package "python-pip" has no installation candidate (When I tried to install pip)
2. Package python-numpy has no installation candidate (when I tried to install numpy)
3. unable to locate package python-pyaudio (when I tried to install pyaudio)
I am searching but no solution.
Can anyone please help? I am frozen in a critical stage of my project .
Generally, for new raspbian/raspios os with python 3 by default, it is not suggested to replace the system python interpreter to python 2, it may break some system component's dependency.
Instead, you can create a python 2 virtual env, if you need to run python2 scripts.
sudo apt-get install python3-pip
pip install virtualenv
virtualenv -p /usr/bin/python2.7 venv
source venv/bin/activate
You can test the python version as following,
(venv) $ python --version

How to install Spyder 4 IDE on Raspberry OS

I can install Spyder 3 IDE on Raspberry OS 32-bit easily using:
sudo apt-get install spyder3
However I can't find a way to install Spyder 4. I've tried:
pip3 install spyder
But it shows an error:
Could not find a version that satisfies the requirement pyls-black>=0.4.6 (from spyder) (from versions: 0.1.0, 0.2.0,0.2.1,0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5) No matching distribution found for pyls-black>=0.4.6 (from spyder)

Installing Pillow: "Unable to locate package libwebpmux3"

I am trying to install Pillow on a Raspberry Pi Zero W. I am going through these instructions:
https://brachiograph.readthedocs.io/en/latest/get-started/install.html
When I run:
sudo apt install libwebp6 libtiff5 libjbig0 liblcms2-2 libwebpmux3 libopenjp2-7 libzstd1 libwebpdemux2
I get the error:
E: Unable to locate package libwebpmux3
Any ideas on how to resolve this? Thank you!
I had the same issue when trying to setup a BrachioGraph (https://brachiograph.readthedocs.io/en/latest/get-started/install.html) on Raspberry Pi (Raspbian).
I updated to the latest Raspbian version via the Raspberry Pi website, and was able to install this library.

Why can't I get `pip install lxml` to work within a virtualenv on raspberry pi

It keeps freezing or gives me the
'arm-linux-gnueabihf-gcc': error.
One option is to just use the packaged versions of the lxml module.
If you're on Python 3:
apt-get install python3-lxml
Or on Python 2:
apt-get install python-lxml
If you create your virtualenv with --system-site-packages, you will have access to this install of lxml from the virtualenv.
I'm running Raspbian Stretch on my Pi, and it looks like pip install grabs a binary build (so no gcc required):
(venv) pi#lbb:~ $ pip install lxml
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting lxml
ww Downloading https://www.piwheels.org/simple/lxml/lxml-4.2.1-cp35-cp35m-linux_armv7l.whl (4.9MB)
100% |████████████████████████████████| 4.9MB 1.0MB/s
Installing collected packages: lxml
Successfully installed lxml-4.2.1
Are you running the same distribution on your Pi? If not, please update your question to include that information.