Django Vercel Deployment Issue | 500: INTERNAL_SERVER_ERROR | ModuleNotFoundError: No module named 'distutils'
I have been trying to deploy a Django App on vercel, it is getting deployed but the website is not working says "This Serverless Function has crashed"
Requirements.txt
Django==3.1.12
djongo==1.3.7
dnspython==2.7.0
pymongo==3.11.4
psycopg2-binary~=2.9.6
setuptools==75.7.0
vercel.json
{
"builds": [{
"src": "inventory_management/wsgi.py",
"use": "@vercel/python",
"config": { "maxLambdaSize": "15mb", "runtime": "python3.9" }
}],
"routes": [
{
"src": "/(.*)",
"dest": "inventory_management/wsgi.py"
}
]
}
The error says,
from distutils.version import LooseVersion ModuleNotFoundError: No module named 'distutils'
Tried adding setuptools in requirements.txt but still the same issue