Summary
On Flex Consumption (Python), azd deploy triggers a remote Oryx build that uses Python 3.11.8 regardless of the Function App's configured runtime version (functionAppConfig.runtime = { name: python, version: 3.13 }). Because the build runs on 3.11, any dependency that is published as Python-3.13-only cannot be installed and the deploy fails.
Concretely, a 3.13 app that depends on azure-functions==2.1.0 (which has Requires-Python >=3.13) fails the remote build:
/opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot \
--platform python --platform-version 3.11.8 -p packagedir=.python_packages/lib/site-packages
ERROR: Could not find a version that satisfies the requirement azure-functions==2.1.0
ERROR: No matching distribution found for azure-functions==2.1.0
The (from versions: ... 1.26.0b3) list confirms pip is running on an interpreter (3.11) where 2.x is filtered out by Requires-Python.
Expected
The Flex Consumption remote build should run on the same Python version configured for the app (functionAppConfig.runtime.version, here 3.13), so 3.13-only wheels install correctly.
Actual
azd deploy POSTs to https://<app>.scm.azurewebsites.net/api/publish?RemoteBuild=true, and the server-side Oryx build is invoked with a hardcoded/defaulted --platform-version 3.11.8. The app's functionAppConfig.runtime.version=3.13 is ignored by the build.
Repro
- Flex Consumption plan (FC1), Linux, Python.
- App
functionAppConfig.runtime = { python, 3.13 } (verified via az functionapp show).
requirements.txt includes a 3.13-only package, e.g. azure-functions==2.1.0 (Requires-Python >=3.13).
azd up / azd deploy.
- Remote build runs on
--platform-version 3.11.8 → No matching distribution found.
What did NOT change the build interpreter
- Setting
infra/main.bicep runtimeVersion: '3.13' and re-provisioning (server-side runtime confirmed 3.13).
az functionapp restart + redeploy.
- A repo-root
runtime.txt containing python-3.13 (ignored by the Flex publish path).
- No
PYTHON_* / ORYX_* / build app settings present.
azd deploy --debug shows azd only sends POST /api/publish?RemoteBuild=true — it does not pass --platform-version, so the 3.11.8 selection happens server-side in the Flex build service. Filing here because azd owns this deploy path and the default; please route to the Functions/Flex build-service team if the fix belongs there.
Workaround (works)
Bypass the remote build and ship a pre-built package built for the target interpreter:
# cross-build Linux cp313 wheels (uv evaluates markers for the target)
uv pip install \
--target .python_packages/lib/site-packages \
--python-platform x86_64-unknown-linux-gnu \
--python-version 3.13 \
--only-binary :all: \
-r requirements.txt
# deploy as-is, no remote/local build
func azure functionapp publish <APP_NAME> --no-build
This produced a successful deploy with all functions indexed on the 3.13 runtime.
Environment
- azd:
1.25.4 (67d976f0)
- Azure Functions Core Tools:
4.12.0
- OS: macOS 26.5 (25F71)
- Hosting: Flex Consumption (FC1), Linux, Python 3.13, region eastus2
- Failing dependency:
azure-functions==2.1.0 (Requires-Python >=3.13)
Summary
On Flex Consumption (Python),
azd deploytriggers a remote Oryx build that uses Python 3.11.8 regardless of the Function App's configured runtime version (functionAppConfig.runtime = { name: python, version: 3.13 }). Because the build runs on 3.11, any dependency that is published as Python-3.13-only cannot be installed and the deploy fails.Concretely, a 3.13 app that depends on
azure-functions==2.1.0(which hasRequires-Python >=3.13) fails the remote build:The
(from versions: ... 1.26.0b3)list confirms pip is running on an interpreter (3.11) where 2.x is filtered out byRequires-Python.Expected
The Flex Consumption remote build should run on the same Python version configured for the app (
functionAppConfig.runtime.version, here 3.13), so 3.13-only wheels install correctly.Actual
azd deployPOSTs tohttps://<app>.scm.azurewebsites.net/api/publish?RemoteBuild=true, and the server-side Oryx build is invoked with a hardcoded/defaulted--platform-version 3.11.8. The app'sfunctionAppConfig.runtime.version=3.13is ignored by the build.Repro
functionAppConfig.runtime={ python, 3.13 }(verified viaaz functionapp show).requirements.txtincludes a 3.13-only package, e.g.azure-functions==2.1.0(Requires-Python >=3.13).azd up/azd deploy.--platform-version 3.11.8→No matching distribution found.What did NOT change the build interpreter
infra/main.bicepruntimeVersion: '3.13'and re-provisioning (server-side runtime confirmed 3.13).az functionapp restart+ redeploy.runtime.txtcontainingpython-3.13(ignored by the Flex publish path).PYTHON_*/ORYX_*/ build app settings present.azd deploy --debugshows azd only sendsPOST /api/publish?RemoteBuild=true— it does not pass--platform-version, so the3.11.8selection happens server-side in the Flex build service. Filing here because azd owns this deploy path and the default; please route to the Functions/Flex build-service team if the fix belongs there.Workaround (works)
Bypass the remote build and ship a pre-built package built for the target interpreter:
This produced a successful deploy with all functions indexed on the 3.13 runtime.
Environment
1.25.4 (67d976f0)4.12.0azure-functions==2.1.0(Requires-Python >=3.13)