appendix-a

Appendix A. Installing Python and Streamlit

 

This appendix covers

  • How to check what version of Python you have installed (if at any)
  • Installing Python on macOS and Windows
  • Using pip to install Streamlit

Depending on what operating system you're using, you may have to follow slightly different steps to get Streamlit working on your computer.

This guide covers these steps for the two dominant desktop operating systems, macOS and Windows.

A.1 Checking your current Python version

Streamlit supports versions 3.8 and above of Python, so if you have a version older than that, you need to install a newer one.

To check what version of Python you have installed in your system (or if you have Python at all), open up a terminal window (this is the program Terminal on macOS, and Command Prompt—or better yet, PowerShell—on Windows) and enter:

python --version
python -V
'python': command not found
'python' is not recognized as an internal or external command, operable program or batch file.
'Python' was not found; run without arguments to install from the Microsoft Store

If you do have Python installed, the command you typed in will give you a version number like:

Python 3.7.3

If this version number is 3.8 or above (e.g., 3.8.0 or 3.12.2), you're good!

A.2 Installing the right Python version

A.2.1 On Windows

A.2.2 On macOS

A.2.3 What if I want to have multiple versions of Python on my system?

A.3 Installing Streamlit

A.4 Getting the streamlit command to work

A.4.1 On Windows

A.4.2 On macOS