While installing the web app I prepared using python, vertex ai google chat bison model and fastapi, I constantly get Error: Unable to find any supported Python versions error and the installation does not complete. I also specified the Python version in the Requirements file, but it did not help. I use Vercel with github and all my files are in the root directory. My vercel deployment error screenshot is like this:
My files are app.py, .env , Procfile , requirements.txt and vercel.json. The contents of some files are as follows:
.env file:
GOOGLE_API_KEY=MYAPIKEY
Procfile:
web: gunicorn -w 4 -k uvicorn.workers.UvicornWorker app:app
requirements.txt:
fastapi==0.110.0
markdown==3.6
python-dotenv==1.0.1
gunicorn==21.2.0
uvicorn==0.29.0
uvicorn-worker==0.1.0
python-multipart==0.0.9
google-generativeai==0.4.1
google-cloud-aiplatform==1.44.0
python==3.9.0
vercel.json:
{"devCommand": "gunicorn -w 4 -k uvicorn.workers.UvicornWorker app:app","builds": [ {"src": "/app.py","use": "@vercel/python" } ],"routes": [ {"src": "/(.*)","dest": "/app.py" } ]}
My project runs very well on my computer in the VsCode environment, but I am having this problem when deploying on Vercel.
I tried editing the vercel.json
file many times. I updated the versions of the requirements in the requirements.txt
file, i set the python version to 3.9.0
which is supported by vercel at requirements file but it did not solve my problem. I would be very happy if you could help me with what I can do.