You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...setting python_version = "3.9" ... and note that you may be able to just run your fastapi app normally without anything else special like a vercel.json file. As of now, seems to work fine with Node 20.x.
...somewhat buries the issue by including a 3.9.pyc file that apparently controls Vercel's selection of version during build. Unfortunately, this obfuscates the issue, somewhat violates the convention in the docs linked above, and anyway including /__python__ in the checked in files seems unusual.
Here's an example of nextjs, fastapi, and postgres working with Pipfile:
It deploys and works as-is; if python_version is incremented to 3.12, the build succeeds but the API itself 404s.
UPDATE:
Downgrading to 3.9, deploying, then upgrading the Pipfile to 3.12 and re-deploying, makes the example work now. Slowly, I'd point out, but it works. 🤷♂️
fastapi cannot run in python 3.12
The text was updated successfully, but these errors were encountered: