leswright1977 / PySpectrometer2

The Second Incarnation of the Spectrometer project!
Apache License 2.0
204 stars 24 forks source link

Installation Issues #22

Open DeLoafofMilk opened 2 weeks ago

DeLoafofMilk commented 2 weeks ago

I'm trying to install the software on a raspberry pi 4, but I'm having issues with the installation. I followed the instructions of the readme, and I watched the PySpectrometer video where he sets it up but I still can't get it to work. Any advice?

9valleb9 commented 2 weeks ago

Are you able to run libcamera-hello -t 0 and see an image from the camera?

Generally speaking, you want to make sure to run the following:

I also modified /boot/config.txt. There is a section #Automatically load overlays for detected cameras. I have the following:

start_x=1

camera_auto_detect=1

Save all the things and reboot.

You should be able to see an image if the camera is plugged in properly using:

libcamera-hello -t 0

room101-dev commented 5 days ago

There are many issues with the 'install' 1.) The readme says that as of version 3.0 scipy and peakutils are no longer needed 2.) the current readme says to only use 'sudo apt install python34-opencv' of course that will not work as you must explicitly type 'pip install opencv-python'

There are dozens of 'run' problems, it appears that nobody has tested or tried to build; This is common on +5 year old software, the python has moved on; There are pip tools that generate a 'requirements.txt' file that specify exactly what version of the tools 'numpy' to be used, as this is the core of the problem that the 'code' is using obsolete 'types'; The problem here is chicken and the egg, we don't have a 'working' version so we can't generate the requirements.txt; Only the system that has the working version can generate;

This comment about install is the requirements ( with no version info ) for the version 1.0, of little use to version 3.0 which has been updated, but still now this update is 3 years old;

I Haven't even tried to run on a 'pi' yet ( I have dozens of rasperry's ) I just tried 3 different LINUX systems and all the same problem, the program crashes; Mostly because there is no 'error throw' code, the program trys to read the camera and config a calibration on first run, and if it doesn't find a 'spectrogram' it just crashes, there should be graceful 'throw' code so that there is no crash;

...

For 'working' alternatives in 2024, I would suggest thermino, spectrograph, or https://spectralworkbench.org/dashboard, the latter is a 'browser' solution but works standalone, and lets you capture any spectogram then process it using there tools;