'Vercel CLI Pyhon version issue when deploying Django project

When running the vercel command in Ubuntu terminal:

Error! Command failed: python3.6 /tmp/2de7da56/get-pip.py --user

ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please > use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.

python --version returns 3.8.10.

pip --version returns 22.0.4.

vercel --version returns 24.0.1

requirements.txt just has Django == 4.0.3

What I tried:

Ran the script linked in the error message and added its installation directory to PATH.

Updated pip in default directory to 22.0.4.

Even aliased python3.6 to python at one point.

Tried on both Windows and Ubuntu.



Solution 1:[1]

I faced the same error when I recently tried to host my Django rest framework project on vercel. I think the problem is that due to a recent update by pip the minimum version it now supports is python 3.7.

Am assuming you followed jayhale's post on Django deployment to vercel like I did. The problem is that the script in his tutorial runs on python 3.6 that's why vercel is giving out "ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please > use "https://bootstrap.pypa.io/pip/3.6/get-pip.py" instead."

I wrote a post about the work around I found. Just click on the link below and follow the steps in the post.

Link P.s the new script works with python 3.9

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Abubakar