1

Suddenly my GitHub Actions CI workflow failed to install AWS EB CLI, due to breaking changes in urllib v2:

ERROR: botocore 1.29.81 has requirement urllib3<1.27,>=1.25.4, but you'll have urllib3 2.0.2

When trying to use eb deploy anyway, this is the error:

ImportError: cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (/home/runner/.local/lib/python3.8/site-packages/urllib3/util/ssl_.py)

Apparently, DEFAULT_CIPHERS was removed from urllib in v2.

My command for installing awsebcli is simply this:

pip install awsebcli==3.20.5 --upgrade --user

I really suck at Python as it's not my daily tool, so I want to know how this issue is fixed the "proper" way. And who's really at fault here? Is it awsebcli who fails to properly pin urllib at <2? Apparently botocore requires <1.27,>=1.25.4, but still for some reason 2.0.2 was installed - why? Is the correct solution to separately install urllib<2, or to somehow instruct awsebcli to use urllib<2 as a command line option, or to raise an issue with awsebcli?

How do I fix this 1) short-term just to get on with my business and 2) the "proper" way?

Full output of installation:

> pip install awsebcli==3.20.5 --upgrade --user

Collecting awsebcli==3.20.5
  Downloading awsebcli-3.20.5.tar.gz (261 kB)
Requirement already satisfied, skipping upgrade: PyYAML<5.5,>=5.3.1 in /usr/lib/python3/dist-packages (from awsebcli==3.20.5) (5.3.1)
Collecting blessed>=1.9.5
  Downloading blessed-1.20.0-py2.py3-none-any.whl (58 kB)
Collecting botocore<1.29.82,>1.23.41
  Downloading botocore-1.29.81-py3-none-any.whl (10.5 MB)
Collecting cement==2.8.2
  Downloading cement-2.8.2.tar.gz (165 kB)
Requirement already satisfied, skipping upgrade: colorama<0.4.4,>=0.2.5 in /usr/lib/python3/dist-packages (from awsebcli==3.20.5) (0.4.3)
Collecting docker-compose<1.26.0,>=1.25.2
  Downloading docker_compose-1.25.5-py2.py3-none-any.whl (139 kB)
Collecting pathspec==0.10.1
  Downloading pathspec-0.10.1-py3-none-any.whl (27 kB)
Collecting python-dateutil<3.0.0,>=2.1
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Requirement already satisfied, skipping upgrade: requests<=2.26,>=2.20.1 in /usr/lib/python3/dist-packages (from awsebcli==3.20.5) (2.22.0)
Collecting semantic_version==2.8.5
  Downloading semantic_version-2.8.5-py2.py3-none-any.whl (15 kB)
Requirement already satisfied, skipping upgrade: setuptools>=20.0 in /usr/lib/python3/dist-packages (from awsebcli==3.20.5) (45.2.0)
Requirement already satisfied, skipping upgrade: six<1.15.0,>=1.11.0 in /usr/lib/python3/dist-packages (from awsebcli==3.20.5) (1.14.0)
Collecting termcolor==1.1.0
  Downloading termcolor-1.1.0.tar.gz (3.9 kB)
Collecting urllib3>=1.26.5
  Downloading urllib3-2.0.2-py3-none-any.whl (123 kB)
Collecting wcwidth<0.2.0,>=0.1.7
  Downloading wcwidth-0.1.9-py2.py3-none-any.whl (19 kB)
Collecting jmespath<2.0.0,>=0.7.1
  Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)
Collecting cached-property<2,>=1.2.0
  Downloading cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting texttable<2,>=0.9.0
  Downloading texttable-1.6.7-py2.py3-none-any.whl (10 kB)
Collecting docopt<1,>=0.6.1
  Downloading docopt-0.6.2.tar.gz (25 kB)
Collecting docker[ssh]<5,>=3.7.0
  Downloading docker-4.4.4-py2.py3-none-any.whl (147 kB)
Requirement already satisfied, skipping upgrade: jsonschema<4,>=2.5.1 in /usr/lib/python3/dist-packages (from docker-compose<1.26.0,>=1.25.2->awsebcli==3.20.5) (3.2.0)
Collecting websocket-client<1,>=0.32.0
  Downloading websocket_client-0.59.0-py2.py3-none-any.whl (67 kB)
Collecting dockerpty<1,>=0.4.1
  Downloading dockerpty-0.4.1.tar.gz (13 kB)
Collecting paramiko>=2.4.2; extra == "ssh"
  Downloading paramiko-3.1.0-py3-none-any.whl (211 kB)
Collecting pynacl>=1.5
  Downloading PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (856 kB)
Collecting bcrypt>=3.2
  Downloading bcrypt-4.0.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (593 kB)
Requirement already satisfied, skipping upgrade: cryptography>=3.3 in /home/runner/.local/lib/python3.8/site-packages (from paramiko>=2.4.2; extra == "ssh"->docker[ssh]<5,>=3.7.0->docker-compose<1.26.0,>=1.25.2->awsebcli==3.20.5) (39.0.2)
Requirement already satisfied, skipping upgrade: cffi>=1.4.1 in /home/runner/.local/lib/python3.8/site-packages (from pynacl>=1.5->paramiko>=2.4.2; extra == "ssh"->docker[ssh]<5,>=3.7.0->docker-compose<1.26.0,>=1.25.2->awsebcli==3.20.5) (1.15.1)
Requirement already satisfied, skipping upgrade: pycparser in /home/runner/.local/lib/python3.8/site-packages (from cffi>=1.4.1->pynacl>=1.5->paramiko>=2.4.2; extra == "ssh"->docker[ssh]<5,>=3.7.0->docker-compose<1.26.0,>=1.25.2->awsebcli==3.20.5) (2.21)
Building wheels for collected packages: awsebcli, cement, termcolor, docopt, dockerpty
  Building wheel for awsebcli (setup.py): started
  Building wheel for awsebcli (setup.py): finished with status 'done'
  Created wheel for awsebcli: filename=awsebcli-3.20.5-py3-none-any.whl size=363782 sha256=bc52de3458e34fdc14f637bf8e811fbef93e8e0b20afcf62164a5d1908228e2d
  Stored in directory: /home/runner/.cache/pip/wheels/c5/98/dd/aa92c4cf9550e51cb6816fb1d143898a00554dc6e94de25e66
  Building wheel for cement (setup.py): started
  Building wheel for cement (setup.py): finished with status 'done'
  Created wheel for cement: filename=cement-2.8.2-py3-none-any.whl size=99712 sha256=3f334f4c68ade19447b0016ec8fa647b4e3b2c1cbcafcc63a32700fcbda2a35b
  Stored in directory: /home/runner/.cache/pip/wheels/0b/7b/ab/00b71f5a2fc054823e74d65a9376568f1223c0cca63fc20d17
  Building wheel for termcolor (setup.py): started
  Building wheel for termcolor (setup.py): finished with status 'done'
  Created wheel for termcolor: filename=termcolor-1.1.0-py3-none-any.whl size=4830 sha256=699a8487c7089c85c3538bf175bb8d7190c6c99c22d155a2b20049d03b064430
  Stored in directory: /home/runner/.cache/pip/wheels/a0/16/9c/5473df82468f958445479c59e784896fa24f4a5fc024b0f501
  Building wheel for docopt (setup.py): started
  Building wheel for docopt (setup.py): finished with status 'done'
  Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13704 sha256=0f8550a2be8324265c088430bf120eff949c982d2f2b228055d5412e92a5e701
  Stored in directory: /home/runner/.cache/pip/wheels/56/ea/58/ead137b087d9e326852a851351d1debf4ada529b6ac0ec4e8c
  Building wheel for dockerpty (setup.py): started
  Building wheel for dockerpty (setup.py): finished with status 'done'
  Created wheel for dockerpty: filename=dockerpty-0.4.1-py3-none-any.whl size=16604 sha256=fd663c2086f7b1223321239ff451413eaa89256c7f9065c3a9ed92a90375bbd7
  Stored in directory: /home/runner/.cache/pip/wheels/1a/58/0d/9916bf3c72e224e038beb88f669f68b61d2f274df498ff87c6
Successfully built awsebcli cement termcolor docopt dockerpty
ERROR: botocore 1.29.81 has requirement urllib3<1.27,>=1.25.4, but you'll have urllib3 2.0.2 which is incompatible.
JHH
  • 8,567
  • 8
  • 47
  • 91
  • 1
    My quick solution ended up like this: `pip install 'urllib3>=1.26.5,<2' --user`. The min and max were both required since I already had `1.25.x` installed on the used docker image, and `awsebcli` requires `>=1.26.5`, which meant it installed `2.0.2`, which then failed. I assume the error is in awsebcli simply stating `>=1.26.5` instead of `>=1.26.5,<2`? https://pypi.org/project/awsebcli/ – JHH May 17 '23 at 09:19

0 Answers0