diff --git a/python/samples/04-hosting/azure_functions/README.md b/python/samples/04-hosting/azure_functions/README.md index cd410771c6..0580dee843 100644 --- a/python/samples/04-hosting/azure_functions/README.md +++ b/python/samples/04-hosting/azure_functions/README.md @@ -19,18 +19,22 @@ All of these samples are set up to run in Azure Functions. Azure Functions has a ### 2. Create and activate a virtual environment +Using [uv](https://docs.astral.sh/uv/) (recommended): + **Windows (PowerShell):** ```powershell -python -m venv .venv +uv venv .venv .venv\Scripts\Activate.ps1 ``` **Linux/macOS:** ```bash -python -m venv .venv +uv venv .venv source .venv/bin/activate ``` +> **Note:** `python -m venv .venv` also works, but can hang indefinitely on Windows with Microsoft Store Python due to a known `ensurepip` issue. Use `uv venv .venv` to avoid this. + ### 3. Running the samples - [Start the Azurite emulator](https://learn.microsoft.com/en-us/azure/storage/common/storage-install-azurite?tabs=npm%2Cblob-storage#run-azurite) diff --git a/python/samples/04-hosting/foundry-hosted-agents/README.md b/python/samples/04-hosting/foundry-hosted-agents/README.md index dfecb1531b..0ff8c9e945 100644 --- a/python/samples/04-hosting/foundry-hosted-agents/README.md +++ b/python/samples/04-hosting/foundry-hosted-agents/README.md @@ -134,18 +134,25 @@ cd agent-framework/python/samples/04-hosting/foundry-hosted-agents/responses #### Environment setup -1. Navigate to the sample directory you want to explore. Create a virtual environment: +1. Navigate to the sample directory you want to explore. Create and activate a virtual environment using [uv](https://docs.astral.sh/uv/) (recommended): ```bash - python -m venv .venv + uv venv .venv + ``` - # Windows - .venv\Scripts\Activate + ```bash + # Windows (PowerShell) + .venv\Scripts\Activate.ps1 + + # Windows (Command Prompt) + .venv\Scripts\activate.bat # macOS/Linux source .venv/bin/activate ``` + > **Note:** `python -m venv .venv` also works, but can hang indefinitely on Windows with Microsoft Store Python due to a known `ensurepip` issue. Use `uv venv .venv` to avoid this. + 2. Install dependencies: ```bash