Open Andrew123098 opened 2 months ago
Dear @Andrew123098, thank you for your hard work. Good job.
Sorry, but I no longer support this project.
Hello @ivomarvan , Understood. Is the library in a usable state assuming I could perform the installation correctly? Thanks, Andrew
Hello, So I spent the last few days trying to install this library on a Raspberry Pi Zero 2 W running Bookworm 12. Needless to say, it was very difficult because the pip install did not work (failed to find certain .hpp files) and compiling the code from source posed many obstacles due to the makefiles not properly pointing to certain libraries and not linking properly to certain dependencies. After many attempts, I was finally able to do it. Thank you for making this library. Hopefully my little guide below can help others who want to use it.
Installing Whycon Library on Pi Zero 2 W
Increase Swap Memory Size
sudo nano /etc/dphys-swapfile CONF_SWAPSIZE=2048 Ctrl+s Ctrl+x sudo systemctl stop dphys-swapfile sudo systemctl start dphys-swapfile
Verify new swap size
free -h
Installation of module and submodule (submodule is protected for unknown reason)
git clone https://github.com/ivomarvan/pywhycon.git cd pywhycon rmdir whycon_core git clone https://github.com/ivomarvan/whycon_core.git
Create virtual environment with dependencies
python3 -m venv env pip install numpy pybind11 pkgconfig pip install opencv-python
Install global dependencies
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential cmake git pkg-config libjpeg-dev libtiff-dev libpng-dev sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev sudo apt-get install libxvidcore-dev libx264-dev libgtk-3-dev sudo apt-get install libatlas-base-dev gfortran python3-dev sudo apt-get install build-essential cmake git sudo apt-get install libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev sudo apt-get install python3-dev python3-numpy libtbb2 libtbb-dev libdc1394-22-dev sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libopenexr-dev libatlas-base-dev gfortran sudo apt-get install libhdf5-dev libhdf5-103 sudo apt-get install pybind11-dev sudo apt-get install libopencv-dev
Edit the make files in both the pywhycon and whycon_core repositories: I have attached these files to this post. whycon_makefiles.zip
Make sure all files are owned by the user and not the root
sudo chown -R pi:pi /home/pi/pywhycon/
Compile modules (Compiling pywhycon takes +45minues, get a coffee)
cd whycon_core make all -d cd .. make all -d
Install the modules into the local library
python3 setup.py install
Confirm everything works
python3 usecases/show_help.py