Vercel Flask 部署错误:无法找到任何支持的 Python 版本

问题描述 投票:0回答:1

我想在 Vercel 上部署 Flask 应用程序

但是每当我尝试部署它时,都会收到此错误:

Error: Unable to find any supported Python versions.01:53:10.844Learn More: http://vercel.link/python-version

这是 vercel.json 文件:



{
    "version":2,
    "builds": [
        {
            "src":"./index.py",
            "use": "@vercel/python",
            "config":{"runtime":"python3.9"}
        }
    ],
    "routes": [
        {
            "src":"/(.*)",
            "dest":"/"
        }
    ]
}

我尝试将Python版本更改为

3.6, 3.8 , 3.8, 3.11

然后有人告诉我制作一个 pipfile 尝试过,但仍然不起作用

这是 Pip 文件

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"
requests = "*"
python-dotenv = "*"

[dev-packages]

[requires]
python_version = "3.9"
python flask deployment vercel
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.