🖥️ Using Your Own Machine
Set up a local environment (instead of Codespaces) to run the hack projects.
Prerequisites
- An Azure subscription with access to Microsoft Foundry
- Internet access
- A code editor (recommended: Visual Studio Code)
1) Install Python 3.13
Install Python 3.13 from your OS package manager or the official installer.
Verify:
bash
python3 --version
# or on Windows
python --versionExpected:
Python 3.13.x
2) Install Azure CLI
Follow: https://aka.ms/openhack/azurecli
Verify:
bash
az --versionLogin:
bash
az login --use-device-code3) Create a Virtual Environment
From your project folder:
bash
# macOS/Linux
python3 -m venv .venv
source .venv/bin/activate
# Windows (PowerShell)
python -m venv .venv
.\.venv\Scripts\Activate.ps1Upgrade pip:
bash
python -m pip install --upgrade pip4) Install Python Packages
Install required libraries (note: azure-ai-agents is a pre-release):
bash
pip install --pre azure-ai-agents>=1.2.0b3 azure-identity azure-ai-projects jsonref python-dotenvIf you prefer a requirements.txt, use:
txt
azure-identity
azure-ai-projects
azure-ai-agents>=1.2.0b3
jsonref
python-dotenvThen run:
bash
pip install --pre -r requirements.txt5) Verify the Setup
Quick import test:
bash
python - <<'PY'
import azure.identity, jsonref, dotenv
from azure.ai.projects import AIProjectClient
print("✅ Imports OK")
PY6) Recommended VS Code Extensions
- Python (Microsoft)
- Pylance
- Azure CLI Tools (optional)
You're now ready to run the quickstarts and levels locally.