Skip to content

Install Python, VS Code, and Ollama for AI Agent Development

Setting Up Your AI Agent Development Environment

This practical tutorial walks you through the essential steps to get your computer ready for AI development. The setup includes three main components: Python, Visual Studio Code, and the Ollama framework for running large language models locally. For a broader overview of why you might choose local models, see our guide on How AI Models Work: Cloud vs. Local (Free Ollama Setup).

Step 1: Check and Install Python

First, verify if Python is already installed on your system:

  • Open Command Prompt as an administrator

  • Run the following command:

    python --version
    
  • If Python is installed, you will see the version number (e.g., Python 3.10.0)

  • If you get an error like "Python is not recognized," you need to install it

To install Python:

  • Visit the official Python website
  • Select the version for your operating system (Windows, Linux, Mac OS)
  • Run the installer and follow the simple click-through installation process
  • After installation, verify again with python --version

Step 2: Install Visual Studio Code (VS Code)

VS Code is the integrated development environment (IDE) where you will write and run your AI code.

  1. Go to the Visual Studio Code website
  2. Choose the version for your operating system (Windows, Linux, Mac)
  3. Download and install it, the process is straightforward, similar to installing any mobile app
  4. Once installed, open VS Code

Step 3: Install the Ollama Framework

Ollama allows you to run large language models locally on your machine.

  1. Visit ollama.com/download
  2. Download the version suitable for your operating system
  3. Install Ollama. For a more detailed walkthrough, you can also read our guide on Install Ollama and Run Qwen3 4B Locally – AI Model Setup Guide.

Step 4: Download Your First AI Model

After installing Ollama, you need to download a language model. Open your terminal and run one of these commands:

  • For a larger, more capable model:

    ollama pull llama3.2:3b
    
  • For a smaller, faster model:

    ollama pull llama3.2:1b
    

Choose based on your needs: the 3B model is trained on more data and provides better responses, while the 1B model is faster and uses fewer resources.

Step 5: Test Your Ollama Installation

Verify that the model works correctly:

  1. Run the model using:

    ollama run llama3.2:3b
    

    (use llama3.2:1b if you downloaded the smaller version)

  2. The model will start and prompt you for input

  3. Ask a question, such as "What is machine learning?"

  4. The model will display its thinking process and then provide a final answer

Step 6: Create Your Project Folder

Organize your work by creating a dedicated project folder:

  • Navigate to a drive (e.g., D:)
  • Create a new folder named something short like ai_agent or ai-agent
  • A shorter name is better for working in the terminal

Step 7: Configure VS Code

  1. Open Visual Studio Code
  2. Go to File > Open Folder and select the folder you just created
  3. The folder will appear in the Explorer panel on the left
  4. Open the terminal: go to View > Terminal (or use the shortcut)
  5. Trust the folder when prompted (since you created it)

For a deeper dive into managing your coding environment, refer to our guide on Set Up Your AI Agent Project: Virtual Environment Guide for Beginners.

Step 8: Create Your First Python File

In VS Code:

  • Click the New File icon in the Explorer panel
  • Name the file hello_ai.py
  • You can now write Python code in the editor area
  • Enlarge the editor by closing the terminal if needed

You are now fully set up to begin writing programs for AI agent development! To continue learning, check out our tutorial on Understanding APIs and Building Your First AI Assistant in Python. For a complete summary of all the tools installed today, see the Free AI Development Setup: Install Python, VS Code & Ollama Tools page.

Keep this summary

Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.

Save to LunaNotes

Or summarise for another video.

32K+ people have turned 65K+ videos into notes

“Very useful tool. I'm using it for the last couple weeks and I'm loving it so far. Makes learning on YouTube a great experience.”
Bhai Chrome Web Store review

This summary and transcript were automatically generated using AI with the Free YouTube transcript summary tool by LunaNotes.

Related summaries

Free AI Development Setup: Install Python, VS Code & Ollama Tools

Free AI Development Setup: Install Python, VS Code & Ollama Tools

Learn how to set up a complete local AI development environment using three free tools. This guide covers Python installation, Visual Studio Code setup, and Ollama for running AI models on your own computer — no GPU or cloud costs required.

How to Write Your First AI Program in Python with Ollama

How to Write Your First AI Program in Python with Ollama

Learn to write a simple AI-powered Python program that communicates with a local AI model (Ollama). This step-by-step tutorial covers importing libraries, loading environment variables, connecting to the AI, sending a question, and displaying the response.

Install Ollama and Run Qwen3 4B Locally – AI Model Setup Guide

Install Ollama and Run Qwen3 4B Locally – AI Model Setup Guide

Learn how to install the Ollama AI framework on your computer, download the lightweight Qwen3 4B model, and run it locally via terminal. This step-by-step tutorial lets you chat with an open-source LLM right on your own laptop—no cloud or GPU required.

How to Configure AI Model Settings for Your First Python Program

How to Configure AI Model Settings for Your First Python Program

Learn to set up a configuration file (.env) for your AI program, including base URL, API key, and model name. This tutorial shows how to configure Ollama locally so your Python code can communicate with an AI model without hardcoding settings.

Set Up Your AI Agent Project: Virtual Environment Guide for Beginners

Set Up Your AI Agent Project: Virtual Environment Guide for Beginners

Learn how to create a project folder, open it in VS Code, and set up a Python virtual environment to keep your AI development libraries isolated. This step-by-step tutorial explains why venvs prevent version conflicts between projects.

Found this summary useful?

Take it with you. One click puts it in your own LunaNotes library.

Save to LunaNotes

Start taking better notes today with LunaNotes