Skip to content

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

Closed

Description

@kirillgroshkov

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!

Activity

  1. kirillgroshkov commented on Sep 2, 2018

    @kirillgroshkov
    Author
  2. kirillgroshkov commented on Sep 2, 2018

    @kirillgroshkov
    Author

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

  3. joguSD commented on Sep 5, 2018

    @joguSD
    Contributor

    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.

  4. kirillgroshkov commented on Sep 5, 2018

    @kirillgroshkov
    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?

  5. joguSD commented on Sep 5, 2018

    @joguSD
    Contributor

    @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.

  6. rahulrajaram commented on Sep 6, 2018

    @rahulrajaram

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

  7. added
    guidanceQuestion that needs advice or information.
    service-apiThis issue is due to a problem in a service API, not the SDK implementation.
    on Dec 7, 2018
  8. sinjihn-4th-valley commented on Feb 24, 2021

    @sinjihn-4th-valley

    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
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.service-apiThis issue is due to a problem in a service API, not the SDK implementation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions