I'm struggling to change my runtime_config from
runtime_config:
python_version: 3.7
Changing to the documented version, these values are completely ignored and the system drops down to a dockerfile for Python 2.7... with the error
Step #1: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at....
runtime: python
env: flex
entrypoint: gunicorn -k eventlet -b :8080 main:app
runtime_config:
operating_system: "ubuntu22"
runtime_version: "3.10" # I've tried a few variations with and without quotes 3.8, 3.9 etc.
network:
session_affinity: true
manual_scaling:
instances: 1
resources:
cpu: .2
memory_gb: 0.5
disk_size_gb: 10
my gcloud version is
Google Cloud SDK 483.0.0
app-engine-python 1.9.113
beta 2024.06.28 bq 2.1.6
cloud-datastore-emulator 2.3.1
core 2024.06.28
gsutil 5.30
Here says you need 420.0.0 +
https://cloud.google.com/appengine/docs/flexible/python/runtime
Solved! Go to Solution.
Hi @nodata,
I understand that you are using the latest gcloud version but based on the deprecation error you shared, it looks like it was caused by a Python/pip compatibility and dependency issue.
Replication:
I tried reproducing the behavior using the latest Python sample app and was able to deploy the app without the error. The sample app is utilizing the newest runtime_config.
Troubleshooting:
Recommendations:
sudo python3 get-pip.py (install in root directory)
pip3 install --upgrade pip
python -m pip install --upgrade pip
python -m pip uninstall pip
apt-get remove python-pip
apt-get install python-pip
pip install pip==24.1.2
Hope this helps.
Hi @nodata,
I understand that you are using the latest gcloud version but based on the deprecation error you shared, it looks like it was caused by a Python/pip compatibility and dependency issue.
Replication:
I tried reproducing the behavior using the latest Python sample app and was able to deploy the app without the error. The sample app is utilizing the newest runtime_config.
Troubleshooting:
Recommendations:
sudo python3 get-pip.py (install in root directory)
pip3 install --upgrade pip
python -m pip install --upgrade pip
python -m pip uninstall pip
apt-get remove python-pip
apt-get install python-pip
pip install pip==24.1.2
Hope this helps.
Hi @jaydubu thanks so much for your quick reply, this sorted it.
I'm still not au fait with venv and the current python interpreter etc. having a bearing on deployment.. I'll try to make sure everything is in sync the next time I deploy or need to move beyond what I have now.