Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation is broken: Requirement.parse('urllib3<1.23,>=1.21.1') #3535

Closed
kirillgroshkov opened this issue Sep 2, 2018 · 8 comments
Closed
Labels
guidance Question that needs advice or information. service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@kirillgroshkov
Copy link

I'm running pip install --upgrade awscli awsebcli && rm -rf ~/.cache/pip \ && aws --version && eb --version

awscli returns this stacktrace:

aws-cli/1.16.6 Python/2.7.9 Linux/4.9.93-linuxkit-aufs botocore/1.11.6
Traceback (most recent call last):
  File "/usr/local/bin/eb", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3105, in <module>
    @_call_aside
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3089, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3118, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 580, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 593, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 786, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (urllib3 1.23 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('urllib3<1.23,>=1.21.1'), set(['requests']))

Help!

@kirillgroshkov
Copy link
Author

Same issue on aws forum: https://forums.aws.amazon.com/thread.jspa?threadID=289084

@kirillgroshkov
Copy link
Author

Found workaround: pip install --upgrade "urllib3==1.22" awscli

@joguSD
Copy link
Contributor

joguSD commented Sep 5, 2018

This is actually unrelated to the awscli, and will happen if you install awsebcli by itself. The problem here is that awsebcli has requests and botocore as dependencies which both depend on urllib3, but have different upper bounds in the version that they allow so you end up running into this pip issue.

@joguSD joguSD closed this as completed Sep 5, 2018
@kirillgroshkov
Copy link
Author

But, but... as a sole user of awscli I'm not even a python person, do I need to know about underlying technologies if I just need CLI to work according to documentation?

In other words, is it possible to provide some kind of "binary" or prebuilt version of the CLI to avoid such problems in future?

@joguSD
Copy link
Contributor

joguSD commented Sep 5, 2018

@kirillgroshkov You're absolutely right that as an end user of the CLI you shouldn't need to care that much about the fact that it's implemented in python. While we don't have a 'binary' exactly we do generate bundled installers which installs the AWS CLI and its dependencies in an isolated virtual environment to avoid dependency conflicts like these.

I'm not sure if the team that works on awsebcli has something similar or if pip is the only way to install it. Just to clarify, in your snippet above what failed above wasn't aws --version but eb --version.

@rahulrajaram
Copy link

@kirillgroshkov sorry you are facing this problem. It will be fixed in EBCLI 3.14.5 which will be out hopefully early next week.

@sinjihn-4th-valley
Copy link

sinjihn-4th-valley commented Feb 24, 2021

This still appears to be an issue when installing from the other repository. I just ran a fresh install.
https://github.com/aws/aws-elastic-beanstalk-cli-setup.

Traceback (most recent call last):
  File "/Users/sinjihnsmith/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 567, in _build_master
    ws.require(__requires__)
  File "/Users/sinjihnsmith/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 884, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/sinjihnsmith/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 775, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (urllib3 1.25.9 (/Users/sinjihnsmith/.pyenv/versions/3.5.4/lib/python3.5/site-packages), Requirement.parse('urllib3<1.25,>=1.24.1'), {'awsebcli'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sinjihnsmith/.pyenv/versions/3.5.4/bin/eb", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/Users/sinjihnsmith/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3238, in <module>
    @_call_aside
  File "/Users/sinjihnsmith/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3222, in _call_aside
    f(*args, **kwargs)
  File "/Users/sinjihnsmith/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3251, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/Users/sinjihnsmith/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 569, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/Users/sinjihnsmith/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 582, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/Users/sinjihnsmith/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 770, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'urllib3<1.25,>=1.24.1' distribution was not found and is required by awsebcli

@ghost
Copy link

ghost commented Mar 13, 2021

@sinjihn-4th-valley I just solved it with pip3 uninstall awsebcli && pip3 install --upgrade awsebcli 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information. service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

5 participants