michaelriedl / michaelriedl.github.io

0 stars 0 forks source link

Installing Streamlit on RPi4 #2

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Installing Streamlit on RPi4

https://michaelriedl.com/2021/01/29/pi4-streamlit-install.html

lukesf commented 2 years ago

Thanks for sharing! It did help, however I get 502 gateway issues with https://apache.bintray.com/...

Alternate happy path for anyone down this rabbit hole. If ok without the latest and greatest was downgrade of streamlit to pre-arrow dependency: pip3 install streamlit==0.62.0 Found here: https://discuss.streamlit.io/t/raspberry-pi-streamlit/2900/7

michaelriedl commented 2 years ago

@lukesf thanks for pointing that out! I updated the commands to point to a source that is still active. I was able to recreate my installation for v1.3.1.

Let me know if you are able to get it working with the updated commands.

nakanaela commented 2 years ago

It appears that the .deb downloaded now is no longer a proper file, but working ones can be pulled from https://apache.jfrog.io/artifactory/arrow/debian/ but I have found a somewhat easier method on the 64bit version of Raspberry Pi OS Buster.

Updating pip3 seemed to work for me. Following that, the following worked without issue (or compiling)

pip install pyarrow
pip install streamlit

I followed some hints from https://github.com/apache/arrow/issues/10564 that suggested an old version of pip might be pulling from older repositories and I noticed that after the update, I went from sourcing pyarrow-7.0.0.tar.gz to pyarrow-7.0.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

michaelriedl commented 2 years ago

@nakanaela thanks for sharing!

I tested the pip update approach on my setup (Ubuntu 20.04.4 LTS on a Pi 4) and it works! I'll update the post as well.

pip install --upgrade pip
pip install streamlit
Croccodoyle commented 3 months ago

Tried all of above on Raspberry Pi 5, no joy.....

michaelriedl commented 2 months ago

@Croccodoyle can you share what OS and version you tried this on? I can test on my Pi 5 as well. Thanks!

ewxam commented 2 months ago

Hi @michaelriedl, I set up the virtualenv with my raspberry pi 4. It is working, but I can't seem to connect to a mySQL server. The setup I did was

Everytime when I run this on the PI it is saying it is missing SQL DB connection configuration. Im using the demo code that is presented on the Streamlit community and printing it into an DF.

import streamlit as st

Initialize connection.

conn = st.connection('mysql', type='sql')

Perform query.

df = conn.query('SELECT * from lap LIMIT 100', ttl=600) st.table(df)

This is my secrets.toml file:

.streamlit/secrets.toml

[connections.mysql] dialect = "mysql" host = "192.168.0.100" port = 3306 database = "f1db" username = "admin" password = "admin"

If I redo every step on my windows laptop with an virtual env, it is working.. Im clueless at the moment.