charann29 / opensource

106 stars 246 forks source link

Setting Up Streamlit on Windows : showing command not found #356

Open sathvikasriramula opened 3 months ago

sathvikasriramula commented 3 months ago

streamlit : The term 'streamlit' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

charann29 commented 3 months ago

Setting Up Streamlit on Windows

This guide outlines two methods for setting up Streamlit on Windows:

Method 1: Standard Setup

  1. Install Streamlit:

    • Open a Command Prompt window.
    • Run the following command to install Streamlit using pip:

      pip install streamlit
  2. Locate Streamlit Path:

    • To find the installation directory, run this command:

      pip show streamlit
    • Look for the path under "Location" (e.g., C:\Users\<YourUsername>\AppData\Roaming\Python\Python39\Scripts).

  3. Set Up Environment Variables:

    • Press the Windows key + R, type sysdm.cpl, and press Enter. This opens the System Properties window.
    • Go to the "Advanced" tab and click on the "Environment Variables" button.
    • Under "System variables", find the variable named "Path" and click "Edit".
    • Click "New" and paste the Streamlit installation path you copied earlier.
    • Click "OK" on all open windows to save the changes.
  4. Verify Setup:

    • Open a new Command Prompt window.

    • Run the following command to check the Streamlit version:

      streamlit --version
    • If successful, you should see the installed version displayed.

Method 2: Addressing the Extra Click (Windows Specific)

This method highlights the additional click required in Windows:

  1. Install Streamlit: (Follow steps 1 and 2 from Method 1)

  2. Set Up Environment Variables (One More Click):

    • Press the Windows key + R, type sysdm.cpl, and press Enter. This opens the System Properties window.
    • Go to the "Advanced" tab and click on the "Environment Variables" button. (This is the extra click)

    Adding Streamlit to the Path:

    1. Under "System variables", find the variable named "Path" and click "Edit".
    2. Click "New" and paste the Streamlit installation path you copied earlier.
    3. Click "OK" on all open windows to save the changes.
  3. Verify Setup: (Follow step 4 from Method 1)

This guide provides clear instructions with both standard and Windows-specific approaches.

image image image

charann29 commented 3 months ago

please change the issue name to Setting Up Streamlit on Windows