Berryconda installation 404 and confusion over pip usage
AlecVercruysse opened this issue · 8 comments
Was hoping to install the GUI to get a minimal example of how you use MQTT to communicate with the Z-stage esp32 and the led matrix esp32. Along the way, I've run into some issues:
In the UC2-env section of the install guide in the GUI/RASPBERRY_PI
readme, all the wget
commands (and some hyperlinks the readme) return 404 since the folder is not found.
It looks like this is just an artifact of moving the SCRIPTS/ folder to be a subdir of /GUI/RASPERRY_PI
?
If these scripts are only to install berryconda, may I propose that the recommendation of using berryconda be dropped. It seems to be that berryconda will no longer be actively maintained (according to jjhelmus/berryconda#83). It already does misses python 3.7 support (jjhelmus/berryconda#40).
This install could be made much simpler, in my opinion, by including a simple requirements.txt file and advising users to use the built-in venv module (python3 -m venv
) to manage their virtual environments. Did berryconda bring anything else to the table other than some pre-compiled scientific packages?
Along these same lines, I believe that the python -m pip install --user
either circumvents the venv completely (installing in ~/.local/lib
) or fails on purpose, since the --user
option specifies a specific install location outside of a venv. The previous behavior is the result of a recently-closed bug: pypa/pip#5702. The fix for this was released early this year so it is very likely that previous installations using this guide depended on that.
Since venvs specify their own path for pip, the reason python -m pip
was recommended in the first place (to circumvent ambiguous paths) is no longer really an issue either, and, in my opinion, it is safe to just use the simplest version of the command: pip install
. Am I missing another explicit reason for this method of installing files?
Please let me know if you recommend I submit a PR for this (I'm still in the process of dealing with the kivy build to set up the GUI, so I would have to wait a bit until I'm sure everything works).
Sounds good, I'll start a PR that fixes the paths and removes --user
from the pip options.
It makes sense to stick with berryconda for now until 64 bit raspian becomes more mainstream.
I would love a cli script that shows communication from the command line. Ultimately, since my team is building an FPM setup and would like to pursue fast computation, I think the pi will be relegated to sending the photos to a more powerful computer, and communicating with the matrix/z-stage over mqtt, rather than hosting a GUI. We will make sure to watch for updates in the documentation of the GUI however!
Thanks for the script! I will use it ASAP to start understanding your communication protocol.
I don't mean to rush the GUI documentation, I see that it is marked as something that will be added at one point in the readme!
For our application, we hope to at one point be able to take (and transfer) images quickly to our processing server from a headless rpi. Since we are using the raspberry pi HQ camera, we are actually planning on processing the Bayer data from the sensor (as seen in Aidukas, T., Eckert, R., Harvey, A.R. et al. Low-cost, sub-micron resolution, wide-field computational microscopy using opensource hardware.)
Ideally, we would quickly transfer our images as quickly as possible to be saved on the main PC. I believe that our first implementation will use picamera
and stream the images to a BSDsocket, as is described in the picamera docs.
The computation program on the server will most likely start out looking like a script ran from the cli, but later would ideally turn into a simple flask app that allows for a simple GUI via web browser.
I am a bit confused by your request. What work needs to be done on the new application? I would be happy to help contribute to that. If not, I would also be glad to help try to simplify install instructions. I do believe that as long as kivy is included as a dependency of your older version of the GUI, the install will unfortunately be an arduous process. Additionally, I do get a lot of crashes when I try the GUI but I will attempt another clean reinstall with conda and see if that fixes anything.
I apologize, but I see no comments on my PR except my own. Is your comment elsewhere?
@AlecVercruysse Did you consider using a Nvidia Jetson instead of the Pi? I could imagine, since it can run openCV on GPU and the Picamera can also be used, it represents a vivid alternative. I made good some good experiences with it.
@renerichter, we are currently still trying to work all these parameters out. Imaging speed is not (yet) a big concern to us, but since we plan to experiment with the algorithms in the paper I referenced in my last comment, we need to work with completely unprocessed bayer data.
We use http streaming, with the very useful eLinux RPi-Cam-Web-Interface app, to access our camera as of now. It works well to do the basic imaging and testing right now, but I have yet to see if it easily modifiable to set custom settings (e.g. exposure time) and provide raw bayer data with http requests.
I get a consistent crash with the GUI every time I click "start experiment," but I admit since I do not know how to use the GUI at all, that could be a user mistake. I plan to look into it later when I hook up a monitor/mouse/kb to the pi. The esp32 code all worked very well, except I switched from the adafruit noepixel libraries to a FastLED port, due to the issues encountered when disabling interrupts due to the bit-banging behavior of the adafruit lib (described in adafruit/Adafruit_NeoPixel#139). This helped improve stability on my esp32, if you experience similar issues (it particularly affected my ability to connect to wifi/the mqtt server), I can submit a PR for the fix.
@beniroquai the Nvidia Jetson looks promising, but I think that ultimately since processing FPM can take almost half an hour on a core i7 (according to the original paper), it is best practice to leave all calculations to an external machine for now. I could be wrong, but I also believe that FPM calculations cannot take advantage of the GPU since they're all floating point.
I'll close this since the PR has been merged!