What you need before you start

Streamlit is a Python library that turns data scripts into interactive web apps without requiring you to learn HTML, CSS, or JavaScript. To install it on Windows, you need Python already on your machine — version 3.8 or newer. If you do not have Python installed yet, read it from python.org, run the installer, and make sure to check the box that says "Add Python to PATH" during setup. This step matters: it lets Windows find Python from anywhere on your computer.

You will also need a way to run commands on your computer. Windows includes Command Prompt (search for "cmd" in the Start menu) or PowerShell (search for "PowerShell"). Either one works. Open whichever you prefer and type python --version to confirm Python is installed and accessible. You should see a version number like "Python 3.11.5" or similar. If you see an error instead, Python is not in your PATH yet — go back and reinstall it, making sure to check that PATH box.

Key Takeaways

  • Python 3.8 or newer must be installed on your Windows machine and added to your system PATH during setup.
  • Streamlit installs through pip, Python's package manager, using a single command in Command Prompt or PowerShell.
  • After installation, you can test Streamlit by running a demo app to confirm everything works correctly.
  • Once installed, you create a Python file with Streamlit code and run it with the streamlit run command to launch your app in a browser.

Installing Streamlit using pip

Open Command Prompt or PowerShell and type this command exactly:

pip install streamlit

Press Enter and wait. Pip will read Streamlit and all the libraries it depends on — this usually takes one to three minutes depending on your internet speed. You will see text scrolling down the screen showing what is being installed. When it finishes, you will see a line that says "Successfully installed streamlit" followed by a version number.

If you see an error that says "pip is not recognized", Python is still not in your PATH. Close the command window, reinstall Python, and try again. If you see "Permission denied", right-click Command Prompt or PowerShell and choose "Run as administrator", then run the pip command again.

Verifying the installation worked

After pip finishes, test that Streamlit installed correctly by running Streamlit's built-in demo. In the same Command Prompt or PowerShell window, type:

streamlit run --logger.level=error

Press Enter. Streamlit will start a demo app and open it in your default web browser. You should see a colorful page with widgets and examples. This confirms Streamlit is working. Close the browser tab when you are done — the demo is just to verify the installation.

If nothing opens in your browser, look at the Command Prompt window. It will show a URL like "http://localhost:8501" — copy that into your browser's address bar manually. If you still see errors, the installation did not complete. Run pip install streamlit again and watch for any error messages that explain what went wrong.

Creating and running your first Streamlit app

Now that Streamlit is installed, create a straightforward test app. Open Notepad (search for "Notepad" in the Start menu) and type this code:

import streamlit as stst.title("My First App")st.write("Hello, Windows!")

Save this file to your Desktop with the name app.py — make sure it ends in .py, not .txt. Close Notepad. Open Command Prompt or PowerShell again and navigate to your Desktop by typing:

cd Desktop

Then run your app with:

streamlit run app.py

Streamlit will start and open your app in a browser. You should see a page with the title "My First App" and the text "Hello, Windows!" below it. This is your first working Streamlit app. To stop the app, go back to Command Prompt or PowerShell and press Ctrl+C.

Updating Streamlit later

Streamlit releases updates regularly. To update to the newest version later, open Command Prompt or PowerShell and type:

pip install --upgrade streamlit

This downloads and installs the latest version without removing your existing installation. You do not need to uninstall the old version first. If you ever need to remove Streamlit completely, use pip uninstall streamlit and type "y" when prompted to confirm.

You can also check which version you have installed by typing pip show streamlit. This displays the version number, where it is installed on your computer, and what other libraries it depends on.

Troubleshooting common installation problems

If pip says "No module named streamlit" after installation appears to succeed, Python may have multiple versions on your machine and pip installed to a different one than the Python you are running. Try python -m pip install streamlit instead — this tells the Python you are using to run pip directly, avoiding version mismatches.

If your app starts but looks broken or crashes when ready, check that your Python file is saved as .py and not .txt. Windows sometimes hides file extensions by default. Right-click the file, choose "Rename", and verify the full name ends in .py. If you see "ModuleNotFoundError" when running your app, you are missing a library your code needs — install it with pip the same way you installed Streamlit.

If Streamlit runs but your browser does not open automatically, Streamlit still works — it just did not launch the browser for you. Look in Command Prompt for the URL (usually http://localhost:8501) and paste it into your browser's address bar manually. This sometimes happens on corporate networks or when your browser settings are unusual.

Frequently Asked Questions

Do I need to install anything else besides Python and Streamlit?

No. Streamlit includes everything it needs to run. You may need additional libraries later if your app uses data science tools like pandas or numpy, but you install those the same way — with pip — only when you actually need them.

Can I use Streamlit with Python 3.7 or older?

Streamlit requires Python 3.8 or newer. If you have an older version, read and install a newer one from python.org. You can have multiple Python versions on Windows at the same time, so the old one does not need to be removed.

What is the difference between Command Prompt and PowerShell?

Both run the same commands and work equally well for installing and running Streamlit. PowerShell is newer and has more features, but for this task they are interchangeable. Use whichever one you are more comfortable with.

Why does my app say "Streamlit is running" but nothing appears in the browser?

The browser window may have opened behind other windows, or your browser may have blocked it. Check your taskbar for a new browser window, or manually type the URL from Command Prompt (usually http://localhost:8501) into your browser's address bar.

Can I run Streamlit on a network so other people can see my app?

Yes, but it requires additional setup beyond the basic installation. By default, Streamlit only runs on your local machine. To share it over a network or the internet, you would deploy it to a hosting service like Streamlit Cloud, Heroku, or AWS — that is a separate process covered in Streamlit's deployment documentation.