Python Development Environment Setup
In this guide you will set up your machine to use the MeshAgent Python SDK. Note that MeshAgent requires Python 3.13. We recommend using uv, a modern Python tool that:- Installs the correct Python version automatically
- Creates and manages virtual environments
- Installs dependencies consistently across platforms
Step 1: Install uv
Step 2: Create a project directory
Create a folder where you’ll run the MeshAgent examples:bash
cd into it.
Step 3: Initialize the project, create a virtual environment, and install MeshAgent
bash
How uv commands fit together
uv initinitializes the project and records the required Python versionuv venvensures that Python version is available and creates the virtual environmentuv addinstalls dependencies into the virtual environment
Step 4: Running commands and activating your virtual environment
Withuv, you can either activate the virtual environment and run commands normally, or run commands through uv using uv run, which automatically uses the project’s virtual environment without activation.
Option A: Activate the virtual environment (recommended for frequent CLI use)
(.venv) at the start of your terminal prompt. With the environment activated you can run commands directly:
bash
Option B: Use uv run (no env activation required)
If you prefer not to activate the virtual environment, prefix commands with uv run:
bash
Keeping your environment up to date
To upgrade MeshAgent and other dependencies to their latest compatible versions, run:bash
uv lockvsuv sync
uv lockupdates the dependency versions recorded for the projectuv syncinstalls the versions recorded in the lockfile into your virtual environment
Next Steps
You’re ready to continue with the Getting Started guide.Troubleshooting
Command not found (meshagent, python):
- Make sure the virtual environment is activated and you are in the correct project directory
- Or use
uv run meshagentor `uv run pyhton…```
- On macOS/Linux, you might need to restart your terminal after installing uv, or run
source ~/.bashrcorsource ~/.zshrc.