Prerequisites
Python Version
Most projects require Python 3.10 or higher. Some advanced projects require Python 3.11+.Check Python Version
Install Python
- macOS
- Ubuntu/Debian
- Windows
Virtual Environments
Always use virtual environments to isolate project dependencies.Using venv (Built-in)
Using uv (Faster Alternative)
uv is a fast Python package installer and resolver, used in many projects.
Install uv
Create Virtual Environment with uv
Installing Dependencies
Projects use eitherrequirements.txt or pyproject.toml for dependency management.
Projects with pyproject.toml
Most modern projects usepyproject.toml.
Using pip
Using uv (Recommended - Faster)
Projects with requirements.txt
Example pyproject.toml
Fromadvance_ai_agents/deep_researcher_agent/pyproject.toml:
IDE Setup
VS Code (Recommended)
Install VS Code
Download from code.visualstudio.comEssential Extensions
Install these extensions:-
Python (ms-python.python)
- IntelliSense, linting, debugging
-
Pylance (ms-python.vscode-pylance)
- Fast type checking and auto-completion
-
Python Debugger (ms-python.debugpy)
- Debug Python code
-
Ruff (charliermarsh.ruff)
- Fast linting and formatting
Configure VS Code
Create.vscode/settings.json in project root:
Launch Configuration
Create.vscode/launch.json for debugging:
PyCharm
Configure Interpreter
- Open project in PyCharm
- Go to Settings > Project > Python Interpreter
- Click gear icon > Add Interpreter > Existing
- Select
.venv/bin/python
Configure .env File
- Install EnvFile plugin
- Edit run configuration
- Enable “EnvFile”
- Add path to
.envfile
Common Tools
Git
Required for cloning repositories.Docker (Optional)
For running vector databases and services locally.Install Docker Desktop
Download from docker.comRun Qdrant Locally
Run PostgreSQL with pgvector
Node.js (For MCP Servers)
Required for MCP integrations.Environment Variables
Create .env File
Load Environment Variables
All projects usepython-dotenv:
Project Structure
Typical AI agent project structure:Running Projects
Standard Python Script
Streamlit Applications
Many RAG and advanced agents use Streamlit:FastAPI Services
Some agents expose REST APIs:Troubleshooting
ModuleNotFoundError
ImportError: No module named ‘dotenv’
Permission Denied (macOS/Linux)
SSL Certificate Errors
Port Already in Use
Quick Start Checklist
- Python 3.10+ installed
- Virtual environment created and activated
- Dependencies installed (
pip install -e .) -
.envfile created with API keys - IDE configured with Python interpreter
- Git configured
- Docker installed (if using vector databases)
- Node.js installed (if using MCP)
- Project runs successfully (
python main.py)
Next Steps
API Keys
Configure API keys for AI models and services
Dependency Management
Learn pip, uv, and pyproject.toml
Best Practices
Production-ready patterns and code quality
Multi-Agent Patterns
Start building multi-agent systems