I kept hitting the python version not found error

When I tried to deploy my app, I have this in my vercel.json

{

“functions”: {

“api/[[…path]].py”: {

“runtime”: “vercel-python@3.12”,

“maxDuration”: 60,

“memory”: 1024

}

},

“routes”: [

{ "src": "/api/(.\*)", "dest": "api/\[\[...path\]\].py" },

{ "handle": "filesystem" }

],

“installCommand”: “npm --prefix svelte_frontend ci”,

“buildCommand”: “npm --prefix svelte_frontend run build”,

“outputDirectory”: “svelte_frontend/build”

}

And I kept hitting the error Error: Function Runtimes must have a valid version, for example now-php@1.0.0.

Hi,

You don’t need this to deploy. You can just keep .py file in /api folder and our system will automatically detect that. Here is an example: examples/python/hello-world at main · vercel/examples · GitHub