Skip to content

02 Environment Setup

Setup Ollama

Ollama is an open-source application that allows us to create, run and share large language models locally with command-line interface.

  1. Download Ollama here
  2. After installation, open a PowerShell window and run the below command.
    ollama run llama3.2
    
  3. To setup other models refer the open-source models listed here
        # To install gemma 3 model with 4 billion parameters.
        ollama run gemma3:4b
    

Setup Anaconda

  1. Download and Install Git
  2. Download and Install Anaconda (or Miniconda if you do not have enough memory).
  3. Clone the repo and run the below command to install the dependencies.
    conda env create -f environment.yml
    
  4. After installing the dependencies run the below command to activate the environment.
    conda activate llms
    
    Note: The prompt in PowerShell window should change from (base) to (llms) as mentioned in the environment.yml file.
  5. Run jupyter lab in PowerShell to open the Jupyter lab window.

For detailed setup instructions, visit here

Note: If you do not want to run anaconda in your machine. Take a look at Setup Virtualenv for the alternative setup.

Setup Virtualenv

Note: This is an alternative setup to Setup Anaconda. If you already have anaconda setup done, you will not need this.

  1. Download and Install Python. (Compatible version with all dependencies as of 24-09-2025 is Python 3.11).
  2. Download and install Microsoft C++ Build Tools.
  3. Clone the repo and run the below command at the root of the directory to install the dependencies.
    python -m venv llms
    
  4. Activate the virtual environment by running the below command.
    llms\Scripts\activate
    
  5. Run the commands below to install the dependencies.
    python -m pip install --upgrade pip
    pip install -r requirements.txt
    
  6. Run jupyter lab in PowerShell to open the Jupyter lab window.

Setup OpenAI

  1. Login to OpenAI
  2. Add payment details here and add the minimum amount of 5$.
  3. Generate API key here. Remember to save the key, it will be visible only at the time of generation.

Note: To setup API keys on other models such as Claude or Gemini - Claude: https://console.anthropic.com - Gemini: https://ai.google.dev/gemini-api

Setup Environment Variables

  1. Create a .env file.
  2. Store the environment variables and secrets such as the OPENAI_API_KEY in the below format.
    OPENAI_API_KEY=sk-proj-XXXXXXXXXXXXXX