Did you ever land on something? I’m looking for the same solution to your problem.
I have used a work around that might not work for others but the app for us is for only a few people so what I did was made sure python and the most up to date version of streamlit were installed on each users desktop. After that I created a shortcut for each user to place on their desktop that runs the python code starting up the app. – Once we have a server available that’s been in the works for a bit, I would like to go back to the instructions to figure out how to make it available via that.
I hope that helps.
you can make an exe by doing the following:
create a launcher script that will run streamlit as localhost:
import sys
import os
import streamlit.web.cli as stcli
def run():
folder = os.path.dirname(os.path.abspath(file))
script_path =os.path.join(folder, “app.py”) # your real Streamlit script
sys.argv = [
"streamlit",
"run",
script_path,
"--server.headless=true",
"--server.enableXsrfProtection=false", # for file uploading
"--global.developmentMode=false", # won't work otherwise
"--server.port=8501"
]
sys.exit(stcli.main())
if name == “main”:
run()
when building an exe using pyinstaller you need to collect all the libraries you are using in your scripts, and all the py files as well. Use console flag for debugging.
cmd line:
pyinstaller --onedir –clean --noconsole –collect-all streamlit –collect-data streamlit –collect-all altair –collect-all pyarrow –add-data “app.py;.” main.py