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.
$ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"



Install llvm-10 from source 2 – 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



Install Apache Arrow from source. I adapted instructions from here: https://gist.github.com/heavyinfo/04e1326bb9bed9cecb19c2d603c8d521 12
$ wget https://github.com/apache/arrow/archive/apache-arrow-1.0.1.tar.gz
$ tar xzf apache-arrow-1.0.1.tar.gz
$ cd arrow-apache-arrow-1.0.1/cpp
$ mkdir build
$ cd build
$ export ARROW_HOME=/usr/local
$ cmake \
    -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DARROW_WITH_BZ2=ON \
    -DARROW_WITH_ZLIB=ON \
    -DARROW_WITH_ZSTD=ON \
    -DARROW_WITH_LZ4=ON \
    -DARROW_WITH_SNAPPY=ON \
    -DARROW_PARQUET=ON \
    -DARROW_PYTHON=ON \
    -DARROW_BUILD_TESTS=OFF \
    ..
$ make -j4
$ sudo make install
$ cd ../../python
$ python3 setup.py build_ext --build-type=release --with-parquet
$ sudo python3 setup.py install



Install streamlit.
$ sudo pip3 install streamlit



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 6, 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.