Hi -
I am trying to bring up Streamlit locally and add a get_url
method so I can call st.get_url()
to fetch the current URL from the user’s browser.
I have followed the set up in the contributing guide, however my backend python changes are not reflected, only frontend is!
Here is what I did to test that my python changes are reflected locally…
- Run
yarn start
at streamlit/frontend
- Made changes to
__init__.py
at streamlit/lib/streamlit
(like change spinner default text here )
- Added a new file called
test.py
at streamlit/lib
containing below
import streamlit as st
import time
with st.spinner():
time.sleep(3)
st.success('Done!')
- Run
streamlit run test.py
at streamlit/lib
. The spinner text is not updated to reflect my local changes at http://localhost:3000
!
I think streamlit is still pointing my local binary instead of fetching my local changes, how do I fix this?
Thanks in advance!
A Random Streamlit Fan
Hi Random Streamlit Fan
If your which streamlit
is pointing to your local binary instead of the Pipenv dev environment, maybe your environment is not active ? Did you run :
cd lib
pipenv shell
before streamlit run test.py
? I usually run which streamlit
to ensure I’m in the correct environment
Hi @andfanilo
Thanks for replying! Yes I did run pipenv shell
before.
However my which streamlit
always shows the /Users/zhaoooyue/opt/anaconda3/bin/streamlit
, which is not my local streamlit path. Any idea how to change this?
Thanks
Hmmm, I’m more of a Windows guy than a Unix guy, and more of a Conda user than Pipenv user anyway, perhaps in your PATH
environment variable, even after you use pipenv shell
the path to your local Streamlit is the first one to appear ?
If your pipenv path is the first one in PATH
then perhaps Streamlit is actually not installed and you should rerun make all-devel
in your environment.
Good luck !
Thanks for your help! It’s due to a clash with anaconda - works fine after I uninstalled anaconda
1 Like
Ahah glad you found the clash though it meant the removal of Anaconda
I’m surprised, I’m working in a Unix VM with pipenv installed on my Miniconda and I don’t get your problem…oh well as long as it works
1 Like