Error in vercel while uploading a django app

  Kiến thức lập trình

While trying to upload my Django application I got these errors

requirements.txt error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully
Error: Command failed: pip3.12 install --disable-pip-version-check --target . --upgrade -r /vercel/path0/requirements.txt
  error: subprocess-exited-with-error

how do I come about it?

This is what I have in my vercel.json file:

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

and these are the packages in my requirements.txt file:

Django==4.1.5
django-phonenumber-field==7.3.0
mysqlclient==2.2.4
numpy==1.26.4
phonenumbers==8.13.36
psycopg2==2.9.9
requests==2.31.0
requests-oauthlib==1.3.1
twilio==9.0.5

I have tried using a virtual env but still didn’t work and I also changed the python version from 3.10 to 3.9 in the vercel.json file also didn’t work.

LEAVE A COMMENT