Comments (11)
I encountered the same issue @kytta
I, temporarily, solved my issue by downgrading to python 3.9.
https://github.com/orgs/vercel/discussions/6729
from vercel.
There is a pull request which solves the problem - #11541
from vercel.
I also hit this issue - would really like to avoid downgrading both node and python - any idea when the associated PR will be merged and released?
I would say, switch to flask. Sanic won't work either since its an async framework like FastAPI.
If you can't change the code, I suggest using render.com then because clearly Vercel don't have time for the python community.
Also need to set node version to 18.x in package.json using the code below
{ "engines": { "node": "18.x" } }
I actually didn't have to do this, it worked just from changing the setting from the vercel dashboard in the project settings.
from vercel.
I encountered the same issue @kytta
I, temporarily, solved my issue by downgrading to python 3.9.
Could you please provide an example of vercel.json
? I have changed my settings to py3.9 but it doesn't work (still py3.12).
{
"builds": [
{
"src": "main.py",
"use": "@vercel/python",
"config": {
"legacy": true
}
}
],
"routes": [
{
"src": "/(.*)",
"dest": "main.py"
}
]
}
from vercel.
I encountered the same issue @kytta
I, temporarily, solved my issue by downgrading to python 3.9.
https://github.com/orgs/vercel/discussions/6729Could you please provide an example of
vercel.json
? I have changed my settings to py3.9 but it doesn't work (still py3.12).{ "builds": [ { "src": "main.py", "use": "@vercel/python", "config": { "legacy": true } } ], "routes": [ { "src": "/(.*)", "dest": "main.py" } ] }
There is nothing wrong with your config. Also, the config field in the builds object is unnecessary. To tell vercel to pick up the correct version of python, you need to add the "Pipfile" and "Pipfile.lock"
My vercel.json config file looks like:
{
"builds": [
{
"src": "app.py",
"use": "@vercel/python"
}
],
"routes": [
{
"src": "(.*)",
"dest": "app.py"
}
]
}
My pipfile looks like:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
fastapi = "==0.111.0"
requests = "==2.31.0"
beautifulsoup4 = "==4.12.3"
html2text = "==2024.2.26"
validators = "==0.28.1"
[dev-packages]
[requires]
python_version = "3.9"
python_full_version = "3.9.13"
Check the following links out for more info:
https://vercel.com/docs/functions/runtimes/python#python-version
https://vercel.com/docs/deployments/build-image/build-image-legacy
https://vercel.com/docs/functions/runtimes/node-js#setting-the-node.js-version-in-project-settings
from vercel.
There is a pull request which solves the problem - #11541
yes, but while its not live, the solution should be made clear to the users
from vercel.
I also hit this issue - would really like to avoid downgrading both node and python - any idea when the associated PR will be merged and released?
from vercel.
Same problem, waiting for the PR to be accepted
from vercel.
+1 FastAPI does not work until this is fixed.
from vercel.
Also need to set node version to 18.x in package.json using the code below
{
"engines": {
"node": "18.x"
}
}
from vercel.
Closed via #11675
from vercel.
Related Issues (20)
- [Bug] Vercel failed to build go serverless functions with go >= 1.21 HOT 7
- Ability to speicify vercel.json in monorepo
- Navbar alignment issue in Vercel Templates Marketplace Submission Form HOT 2
- vercel remove --safe no longer preserving rollback deployment HOT 10
- Vercel Build Fails to Locate Next.js Version and Routes Manifest in Custom `distDir` HOT 1
- Vercel build hang when have both app router and page router HOT 1
- Vercel fails to build with dev-dep better-sqlite3 11.2.1
- How to have auto-deploy of specific branches only? HOT 1
- [Bug] `pnpm install` does not respect `--filter` in turborepo during deployment HOT 3
- [Bug] pnpm patch is not applied in turborepo during deployment HOT 2
- Cronjobs are too limited HOT 1
- NextJS Memory Leak Issue: npm WARN deprecated [email protected]: This module is not supported, and leaks memory. HOT 2
- Using getVercelOidcToken in edge function doesn't work HOT 5
- vercel cli has a problem with tsconfig extends from external packages due to older ts-node HOT 1
- [cli] Bug fix proposal: Correct envTargetChoices filtering when existing targets include arrays HOT 6
- Error: The Edge Function "api/chat" size is 2.65 MB. gettting this issue in ts file but on converting to js it works HOT 1
- UI issue HOT 1
- Bug: vercel toolbar causing infinite "resize observer loop" error loop in production HOT 1
- NextJs Discord Bot not working for no reason. HOT 1
- Can't access Vercel hosted website HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vercel.