🐍 Getting Started with Python for AI Projects
Before you build your first AI project, you need a working Python setup. This guide is designed to keep things simple, practical, and beginner-friendly.
1️⃣ Install Python
Check if Python is already installed:
python --version
# or
python3 --version
If you see a version number (e.g. Python 3.11), you’re ready to go.
If not, install Python from
python.org.
Windows users: tick “Add Python to PATH” during installation.
2️⃣ Install a Code Editor
A code editor helps you manage and write Python projects more efficiently.
Recommended: VS Code
3️⃣ Create Your Project Folder
mkdir ai-projects
cd ai-projects
This creates a clean workspace for your AI projects.
4️⃣ Set Up Virtual Environment
A virtual environment keeps your dependencies isolated.
python -m venv venv
Activate it:
- Windows:
venv\Scripts\activate - Mac/Linux:
source venv/bin/activate
If you see (venv), it is active.
5️⃣ Install AI Libraries
pip install openai jupyter
- openai: Connects Python to AI models for text generation and analysis
- jupyter: Interactive notebook for testing AI code step-by-step
6️⃣ Start Jupyter Notebook
jupyter notebook
A browser will open — this is your AI coding workspace.
Create your first notebook:
- Click New → Python 3
- Run this code:
print("Hello, KO7 AI!")
Press Shift + Enter to execute.
7️⃣ How Jupyter Works
- Cells: Code or text blocks
- Run: Execute instantly
- Markdown: Add explanations and notes
## My AI Project
Step-by-step AI learning notebook:
1. Setup environment
2. Install libraries
3. Build AI tool
4. Test results
8️⃣ Save & Stop
- 💾 Save: Ctrl + S / Cmd + S
- 🛑 Close: File → Close and Halt
💡 Beginner Tips
- Always activate your virtual environment first
- Use
pip listto check installed packages - Keep each project in its own folder
- Errors are part of learning
🚀 You are now ready to build your first AI project — such as a text summariser or simple chatbot.
