Install Streamlit on Windows, macOS or Linux

Get Streamlit set up on your system step by step
Heads up! You've already completed this tutorial.

Before you start building apps with Streamlit you will need to have a working installation of Streamlit on your system. If you don't have it set up yet, the following steps will guide you through how to install Streamlit on Windows, macOS or Linux.

If you don't have an installation of Python 3, you will need to install one first. You can download installers for Python 3 from the Python homepage. Once installed, you should be able to follow the instructions below.

Set Up Your Project Environment & Install Streamlit

To keep your projects self-contained, we recommend creating a new virtual environment for each project. Using a virtual environment ensures that your Streamlit installation and its dependencies don't conflict with other Python projects on your system. If you're just learning, you can create a single virtual environment for working through the tutorials.

If you later want to create a new folder for a different project, you can just repeat this process.

Below are the instructions for creating a new project folder, setting up a Python virtual environment, and installing Streamlit using pip on Windows, macOS and Linux.

cmd
> mkdir myapp/
> cd myapp
> python -m venv venv
> venv\Scripts\activate.bat
(venv)> pip install streamlit
sh
$ mkdir myapp/
$ cd myapp
$ python -m venv venv
$ source venv/bin/activate
(venv)$ pip install streamlit
sh
$ mkdir myapp/
$ cd myapp
$ python -m venv venv
$ source venv/bin/activate
(venv)$ pip install streamlit

The pip install streamlit command will download and install the latest version of Streamlit along with all of its required dependencies.

Verify Your Streamlit Installation

Once the installation is complete, you can verify that Streamlit was installed correctly. Start Python by running python from the command line, then try importing Streamlit:

python
import streamlit

If that import works without errors, Streamlit is correctly set up and you're now ready to start building apps with Streamlit.

Bring Your PyQt/PySide Application to Market — Specialized launch support for scientific and engineering software built using Python & Qt.

Find out More

Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak
Martin Fitzpatrick

Install Streamlit on Windows, macOS or Linux was written by Martin Fitzpatrick.

Martin Fitzpatrick has been developing Python/Qt apps for 8 years. Building desktop applications to make data-analysis tools more user-friendly, Python was the obvious choice. Starting with Tk, later moving to wxWidgets and finally adopting PyQt. Martin founded PythonGUIs to provide easy to follow GUI programming tutorials to the Python community. He has written a number of popular Python books on the subject.