Check the Streamlit Version using Terminal
Open the terminal and write the command in your terminal:
streamlit --version
This command should tell you what version the installed streamlit package is.
Streamlit – Complete Setup Guide
Streamlit is an open-source app framework in python language. It helps us create beautiful web apps for data science and machine learning in a little time. It is compatible with major python libraries such as scikit-learn, keras, PyTorch, latex, numpy, pandas, matplotlib, etc. Syntax for installing this library is shown below.
Install StreamLit :
Before you get started, there’re a few things you’re going to need :
1. Download an IDE or text editor
2. Install Python in your system (preferably Python 3.7 – Python 3.10)
3. Install PIP in your system.
Set up your virtual environment
First of all we need to setup a virtual environment to run few commands. This will ensure that the dependencies installed/updated for Streamlit will not impact any other Python projects on the system. Tools that you can use for environment management: pipenv, poetry, venv, virtualenv, conda.
Anaconda Navigator is Streamlit’s officially-supported environment manager on Windows, hence we need to download that.
Install Anaconda
If you don’t have Anaconda install yet, follow this article to install it – how-to-install-anaconda-on-windows.
Create a new environment with Streamlit
Now we will be setting up the environment.
- Anaconda provides steps for setting up Anaconda and managing the environment through the Anaconda Navigator. Follow them and setup Anaconda.
- Next, select the “▶” icon appearing next to your new environment. Then we need to select “Open terminal” from the menu that appears.
- In the command-prompt type
pip install streamlit
- Now, test that the installation worked using the command-
streamlit hello
Creating a Simple application (Hello World) –
The 'hello, world!' script in Streamlit: streamlit hello # to run your python script streamlit run myFirstStreamlitApp.py
You can stop running your app any time using Ctrl + C.