Sometimes you hit a roadblock. That’s natural, in coding.
Below are a few problems our users have seen, and ways they solved them in the past. If what you’re looking for is not on this page, let us know at email@example.com.
First things to try…¶
We try to fix bugs quickly, so many times a problem will go away when you upgrade Streamlit. So the first thing to try when having an issue is upgrading to the latest version of Streamlit:
$ pip install --upgrade streamlit $ streamlit version
…and then verify that the version number printed is
Try reproducing the issue now.
If not fixed, let’s check whether your Python environment is set up correctly. Edit the Streamlit script where you’re experiencing your issue, comment everything out, and add these lines instead:
import streamlit as st st.write(st.__version__)
…and make sure it says the same version as above. If not the same version, contact us for help setting up your environment.
- Try pressing
⌘-Shift-Rto do a hard refresh in Chrome/Firefox.
- Try using Streamlit on another port. This way the browser starts the page
with a brand new cache. For that, add this to
See if you can reproduce your bug again now. If the answer is yes, continue reading this page or contact us.
Remote operation: app URL doesn’t load¶
streamlit hello or
streamlit run my_script.py and it printed out
the URL where you should find your app — but it doesn’t seem to work when
you open that link in a browser!
When running Streamlit remotely, the number one culprit for this is the Streamlit port not being opened on your machine/instance.
The fix depends on your setup. Below are two example fixes:
- “Normal” remote server: Check the firewall settings.
- AWS: First, click on your instance in the AWS
Then scroll down and click on Security Groups → Inbound → Edit. Next, add
a Custom TCP rule that allows the Port Range
Using Streamlit with Pex¶
Streamlit has experimental support for Pex binaries, but with one limitation: the package must not have an entry point.
$ pex streamlit foo bar -o mypexbinary.pex
…which means you can do things like:
Running an interactive console:
$ ./mypexbinary.pex >>> import streamlit as st >>> st.write('Hello from the console!')
Running a script:
$ ./mypexbinary.pex myscript.py
Running the Streamlit CLI tool:
$ ./mypexbinary.pex -m streamlit hello
If you’ve upgraded to the latest version of Streamlit and things aren’t working, you can downgrade at any time using these commands:
You can downgrade at any time with these commands:
$ pip install --upgrade streamlit==0.37 # <- To downgrade Streamlit!