Hello,
I keep running into issues trying to deploy a test project, essentially I took the template Flask/Next-js project and did some changes. Threw it into my github repo, and connected it to Vercel, but I could never deploy.
The error is:
Error: Command failed: pip3.12 install --disable-pip-version-check --target . --upgrade -r /vercel/path0/frontend/nextjs-flask/requirements.txt
14:43:43.873ERROR: Exception:
…
File “/tmp/pip-build-env-bqqrnj3k/overlay/lib/python3.12/site-packages/setuptools/init.py”, line 10, in
import distutils.core
ModuleNotFoundError: No module named ‘distutils’
I am new to this sort of thing so it could definitely be an error with some code I added, but notably, a quick google search shows that distutils was discontinued after Python3.10, and it seems like whatever is doing the deploy action is using Python3.12 maybe?
I have tried specifying to use Python3.10 in the requirements.txt and also removing any code that I think might cause distutils to be used but they give further errors.
Will gladly take any help, including “You’re doing it wrong” , would prefer to know now rather than later. Thanks!