Appendix A. Installing Python and Streamlit
This appendix covers
- How to check what version of Python you have installed (if any)
- Installing Python on macOS and Windows
- Using pip to install Streamlit
Depending on your operating system, you may need 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 Python versions 3.8 and above, so if you have an older version, 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
or
python -V
Note
The -V is case-sensitive (it's a capital 'V', not a small 'v')
If you don't have Python installed, this will give you some kind of error, like:
'python': command not found
or
'python' is not recognized as an internal or external command, operable program or batch file.
or
'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.9 or above (e.g., 3.9.0 or 3.12.2), you're good! If it's lower than 3.9 (as shown here), you'll need to install a later version.