BlogPython

invalid Python version specified: failed to resolve version matching How to fix it.

Your project asks for a Python version the builder does not have. The message lists the versions it does have. Pin one of those.

How the Agent API works
What you see
ERROR: invalid Python version specified: failed to resolve version
matching: 3.8 against [the versions the builder offers]
  • What it meansThe version is not offered
  • The fixPin a version from the list
  • Where to pin.python-version is simplest
  • Safe for ML3.12 works for common packages

What it means

Your project asked for a Python version, and the builder has no such version. The message names the version you asked for and lists the versions the builder offers. Retrying without a change fails the same way.

How to fix it

  1. Pick a version from the list in the message

    Choose one of the versions the message lists. For common packages such as tensorflow, torch, numpy and pandas, 3.12 is a safe choice.

  2. Pin it in your project

    Put the version in one of the files the build reads: a .python-version file, a runtime.txt file (for example python-3.12.4), or requires-python in pyproject.toml.

  3. Commit and deploy again

    A failed deploy never counts against your plan.

.python-version
3.12

Where the version comes from

The build looks for a version in this order: .python-version, then runtime.txt, then requires-python in pyproject.toml. If you pin none, Antideploy asks the builder for a default of its own.

When it is Antideploy's default

If the version in the message is not one you chose, the default Antideploy asked for is no longer offered. That is a fault on Antideploy's side. Pin one of the listed versions in .python-version and it builds again straight away, and please tell us so we can move our default.

01Questions

Python version questions, answered.

Anything else? Write to us and a person answers.

support@antideploy.com
Which Python version should I choose?

The newest one in the list that your packages support. If a package fails to install, try 3.12.

Can I use an old version like 3.8?

Only if the builder still offers it. The message shows exactly what is offered.

Does this failed deploy cost anything?

No. Failed deploys never count against your plan.

Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

Start from GitHub or a folder
Prompt copied Paste it into Claude Code, Codex or Cursor and press Enter.