Streamlit on Mac

Hi, I have just install Streamlit on Mac using pip3 install streamlit.

On one machine, i can just type streamlit in terminal but the having no command found for the other mac.

I found the Streamlit is stored in /Library/Frameworks/Python.framework/Version/3.12/bin/streamlit

How can I make it accessible, similar to the first Mac that I can just type streamlit in ther terminal?

Thank you

Uploading: streamlit.jpg…

Hi @WKN, welcome to the forum!

There are a few potential approaches to solve this:

Direct solution

The most direct solution is to add /Library/Frameworks/Python.framework/Version/3.12/bin/ to your PATH, so that when your terminal looks for commands that it can run, it also looks in that directory.

You can do that by running

export PATH="/Library/Frameworks/Python.framework/Version/3.12/bin/:$PATH"

If you want it to be permanent, you can add that line to ~/.zshrc or ~/.bashrc, depending on what shell you are using.

Indirect, but more general solutions

  1. Use a virtual environment (RECOMMENDED)

    There is a good guide to that here: Install Streamlit using command line - Streamlit Docs

  2. Use a tool designed for installing python packages globally

    You can install uv (Installation | uv) and then run uvx streamlit if you just want access to streamlit anywhere on your machine.

    You can similarly use pipx GitHub - pypa/pipx: Install and Run Python Applications in Isolated Environments

Hope those are helpful!

Hi Blackary,

Thank you.

I am a noob, mind explaining export PATH=“/Library/Frameworks/Python.framework/Version/3.12/bin/:$PATH”

I am using Mac zsh.

Thank you again