Installing Streamlit

Hi,
Iā€™ve decided to install Streamlit on my Windows10 after watching a tutorial for beginners, which I am (I have already installed and used an IDE and Python 3.8, though):

Streamlit installation process seemed to work out on my terminal, so I created a simple .py file and call it from the terminal as suggested in the ā€œGet startedā€ guide. It printed ā€˜Hello worldā€™ on the terminal rather than on the local host page. The page I see on the local host is blank.

I tried several times to close and open again the terminal as I could not write any command after that. Once, I managed to see the official page with the demo apps working. But I donā€™t know how to proceed after that.

Then, I decided to explore folders in my pc to understand whether I had installed it or only managed to make it running from the website on my local host.

There are an .exe file and a .py file named after Streamlit in my pc, but if I try clicking on both they open up for just one second and then they disappear.

In a nutshell, there is no way I can write code and run it so far.

Is anybody able to help me?..
Thanks a lot
SereB

Hi @Serena_Boccardo welcome to the streamlit forum!!
I donā€™t work with windows, so Iā€™m not sure about your problem.

If you have worked with Colab before, I have this set of notebooks aimed for starters:

https://github.com/napoles-uach/streamlit_apps/tree/main/Streamlit_Colab

you just need to open a notebook and run all.

Hope it helps!!

Cheers

Thanks a lot for replying @napoles3d

Iā€™ve seen you have a set of 10 notebooks to start, which would be very useful to begin.

I managed to open ā€œ00_Streamlit__Colab_.ipynbā€ in Colab (although I never used it before) and I run all the code up to the point in the screenshot attached

In short, I have added a line of code to your original .py file as indicated. What to do next?

PS Strangely, any .py file I try to open on my pc closes immediately after I open itā€¦

1 Like

Hi @Serena_Boccardo , just click the link:

another thing is that you should use st.write('Hello word') instead of using print function.

Something to keep in mind: if you are running the last cell, while running you are not able to run other cells. If you want to do so, you must stop that cell, but I donā€™t recommend that at this point. Better than that, as you have seen, it is possible to modify the app.py in colab (rigth window in your screen capture) and you should see the changes refflected immediately in your app.
Let me know if this works for you :wave:.

Thanks, it works and I started to understand how (I even succeded to import some random n. tableā€¦)
As a second step, Iā€™ve run your 01 and 02 examples. The first goes well, whereas on the 02_Streamlit__Colab_Networkx.ipynb I get this error, it would be great if you know whatā€™s wrong there :

Tnx again,
S.

Oh, I seeā€¦ maybe is that you are trying to run more than two examples at the same time. It should work stopping other notebooks and restarting the execution.
Iā€™ve run that example and it is running ok.