I am working on a couple of streamlit apps which will eventually be deployed in docker containers on a raspberry pi, and thought I would start this thread incase anyone else is using a pi for deployment.
Installation
On an RPi 4 with raspbian Buster.
It was necessary to first:
$ sudo apt-get install libatlas-base-dev
but I was then able to run streamlit on rpi with no problems, viewing the app using the built in Chromium browser.
Apps
My primary use case is an app to facilitate the optimisation of parameters in a computer vision system that is integrated to my home automation platform. However I think streamlit on an rpi could also have many applications in education, museums/galleries, and in small businesses.
Got a POC working, it is the streamlit demo running in a docker container on an RPi4. I’ve actually installed it as a Home Assistant addon, which provides a nice UI for managing docker images on the pi. This opens up the possibility of creating streamlit data science apps for Home Assistant, or just using Home Assistant as a user friendly way for non technical people to deploy the streamlit apps. I think I will create an app for doing prediction of time series sensor data using the prophet library.
Hello,
I am having issues installing streamlit in a virtualenv on RPi 3 B+ using python 3.7.3. Problem installing dependency pyarrow. The following is the error.
ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly
A downgrade “works”, because pyarrow is part of 0.63 and Components. The point is just to be able to pass dataframes to the front-end, I don’t know that we necessarily need a specific version.
Seeing the PEP517 message though and Googling brought me to:
Is Raspberry Pi a 32-bit system? It sounds like Arrow has an issue here with 32-bit and pip.
There are both 32 bit and 64 bit in circulation, but 32 bit is far more common. I just tried to install streamlit on a 32bit pi4 and it failed. @nightmareforev you can check your OS version following this instruction.
First time posting to the streamlit discussions. I’ve also been trying to install streamlit on a raspi4b and running into an issue compiling pyarrow. I’m on a 64bit ubuntu with an armv8/aarch64 cpu. It looks like the architecture flag for gcc -march=armv8-a is being rejected by the compiler for some reason. I don’t know enough to go any further in debugging this issue. I hope this helps!
I would also like to get streamlit running on my pi.
I’m hitting the same problem!
I tried several versions of pyarrow (0.9.0, 0.10.0, 0.17.1, 1.0.0) but I wasn’t able to install any of them unfortunately.
Is there a workaround other than downgrading streamlit?
Maybe try using miniconda as your build environment? If you can do conda install pyarrow and get a successful install, you can run pip install streamlit after and hopefully get a better result.
Otherwise, not sure what a temporary fix might be. Downgrading works for the short-term, but we are looking to move more of our functionality to Arrow, so we should find a more reasonable solution
Just ran in to this bug while trying to install streamlit to my Raspberry Pi 4. Basically, I can’t seem to get pyarrow installed. Installing streamlit==0.62.0 works as a workaround for now.
This is a problem with pyarrow on arm7l, not with streamlit, but here’s the relevant error messages from the log, which will help people that are googling.
-- Could NOT find Arrow (missing: Arrow_DIR)
-- Checking for module 'arrow'
-- No package 'arrow' found
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Arrow (missing: ARROW_INCLUDE_DIR ARROW_LIB_DIR
ARROW_FULL_SO_VERSION ARROW_SO_VERSION)
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake_modules/FindArrow.cmake:412 (find_package_handle_standard_args)
cmake_modules/FindArrowPython.cmake:46 (find_package)
CMakeLists.txt:210 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-d22ajzwt/pyarrow/build/temp.linux-armv7l-3.7/CMakeFiles/CMakeOutput.log".
error: command 'cmake' failed with exit status 1
----------------------------------------
Failed building wheel for pyarrow
I tried using conda from @randyzwitch latest comment, but it doesn’t work:
$ conda install -c conda-forge pyarrow
Fetching package metadata: ........
Error: No packages found in current linux-armv7l channels matching: pyarrow
Did you mean one of these?
arrow, pyrr
You can search for this package on anaconda.org with
anaconda search -t conda pyarrow
You may need to install the anaconda-client command line client with
conda install anaconda-client
Hey @shadanan, welcome to the Streamlit community! Thanks for doing the research, hopefully the Arrow community can start supporting this some time in the future
I finally got streamlit working on my Raspberry Pi 4. Unfortunately, this turned out to be a lot of work. I will provide as much guidance as possible, but I’m un-inclined to try and do a full tutorial write-up because I don’t want to accidentally break my install.
Here are the steps I used:
Prepare your LD_LIBRARY_PATH. You’ll want to put this in .bashrc or .zshrc.
Install llvm-10 from source – unfortunately, arrow requires llvm-10 at a minimum and the latest llvm in the raspbian package repos was llvm-9. If you can get llvm-10 in some other way, do it that way instead of this. It took a whole night to build llvm-10 on my poor Raspberry Pi.
$ git clone https://github.com/llvm/llvm-project.git
$ cd llvm-project
$ git fetch --tags
$ git checkout llvmorg-10.0.1
$ mkdir build
$ cd build
$ cmake -G "Unix Makefiles" \
-DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi" \
-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=On \
../llvm
$ make -j4
$ sudo make install
Run streamlit as follows. You can also put the LD_PRELOAD in your .bashrc or .zshrc. I think there’s a way to avoid having this, but it looked like I’d have to rebuild either llvm-10 or arrow, and I didn’t want to spend any more time on this.
$ LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1.2.0 streamlit run <python_script.py>
If someone else goes through this and can simplify these steps, I’m sure the community would appreciate it.
It’s not a bad idea to have this available @robmarkcole, but also not sure 1) it needs to be for each release and 2) it needs to be maintained by Streamlit.
From my brief reading above, it looks like it’s instructions about how to compile Arrow, which will be relatively separate from different Streamlit versions. So maybe someone could write a blog post and make a Dockerfile, and then it will exist for the community to maintain?
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.