Installing Streamlit

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

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:

you just need to open a notebook and run all.

Hope it helps!!


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

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.