Just yesterday everything worked fine on our AWS ElasticBeanstalk continuous deployment, but today suddenly fails with the following errors:
$ pip install awsebcli -q --upgrade 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 https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. $ eb deploy production Traceback (most recent call last): File "/usr/local/bin/eb", line 5, in <module> from ebcli.core.ebcore import main File "/usr/local/lib/python2.7/dist-packages/ebcli/core/ebcore.py", line 19, in <module> from ebcli.core import ebglobals, base, hooks File "/usr/local/lib/python2.7/dist-packages/ebcli/core/hooks.py", line 20, in <module> from ebcli.core import fileoperations File "/usr/local/lib/python2.7/dist-packages/ebcli/core/fileoperations.py", line 32, in <module> from json import load, JSONDecodeError ImportError: cannot import name JSONDecodeError Cleaning up file based variables 00:00 ERROR: Job failed: exit code 1
Our initial deploy script assumed python version 2.7 and installation of awsebcli. Here is the snippet from the script:
- apt-get update -y - curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py - python get-pip.py - pip --version - pip install --upgrade pip setuptools - pip install awsebcli -q --upgrade - eb deploy production
But after receiving this error I decided to swap to python3 and install pip3 instead. Here is the updated script and what it throws:
- apt-get update -y - apt-get install -y python3-pip - update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 - update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2 - update-alternatives --list python - python --version - pip3 --version - pip3 install awsebcli -q --upgrade - eb deploy production
$ update-alternatives --list python /usr/bin/python2.7 /usr/bin/python3.5 $ python --version Python 3.5.3 $ pip3 --version pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5) $ pip3 install awsebcli -q --upgrade Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-0a4fa4ab/awsebcli/ Cleaning up file based variables 00:01 ERROR: Job failed: exit code 1
There is no explicit error message thrown, so I can't understand why exactly it exits with code 1. Can you please suggest anything?