Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

`eb init` fails with pkg_resources.ContextualVersionConflict PyYAML 4.1

john_mccabe
Contributor
June 27, 2018

Having some trouble deploying my elastic beanstalk app from a bitbucket pipeline. This same code had been working without issue, so my best guess is some kind of dependency issue.

(awsebcli version 3.14.1)

The image for the pipeline is python:3.5.2 and here's the failing step:

- step:
name: Test Deploy
deployment: test
caches:
- pip
script:
- pip install awsebcli --upgrade
- eb init myAppName -r us-east-1 -p Python
- eb deploy myAppName-dev-1

and the error output:

eb init myAppName -r us-east-1 -p Python Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 570, in _build_master ws.require(__requires__) File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 888, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 779, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (PyYAML 4.1 (/usr/local/lib/python3.5/site-packages), Requirement.parse('PyYAML<4,>=3.10'), {'docker-compose'}) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/eb", line 6, in <module> from pkg_resources import load_entry_point File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3095, in <module> @_call_aside File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3079, in _call_aside f(*args, **kwargs) File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 572, in _build_master return cls._build_from_requirements(__requires__) File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 585, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 779, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (PyYAML 4.1 (/usr/local/lib/python3.5/site-packages), Requirement.parse('PyYAML<4,>=3.10'), {'docker-compose'})

 

So if I'm reading this right, I have PyYAML 4.1 when I need something less than 4.

Any insights into how to resolve this conflict would be greatly appreciated. Thanks for reading.

1 answer

1 accepted

0 votes
Answer accepted
john_mccabe
Contributor
June 27, 2018

I changed the pip install line to explicitly use an older version of PyYAML and that seems to have worked...

Changed

pip install awsebcli --upgrade

To

pip install pyYAML==3.12 awsebcli --upgrade

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events