Skip to content

Import error with pip 9.0.2 #95

@rneilson

Description

@rneilson

Importing the authorizenet library fails with pip 9.0.2:

  File "/srv/wing/.env/local/lib/python2.7/site-packages/authorizenet/apicontrollers.py", line 9, in <module>
    from authorizenet import apicontrollersbase    
  File "/srv/wing/.env/local/lib/python2.7/site-packages/authorizenet/apicontrollersbase.py", line 11, in <module>
    from pip._vendor import requests
  File "/srv/wing/.env/local/lib/python2.7/site-packages/pip/__init__.py", line 45, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/srv/wing/.env/local/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "/srv/wing/.env/local/lib/python2.7/site-packages/pip/download.py", line 40, in <module>
    from pip._vendor import requests, six
  File "/srv/wing/.env/local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py", line 98, in <module>
    from . import packages
  File "/srv/wing/.env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages.py", line 12, in <module>
    sys.modules['pip._vendor.requests.packages.' + mod] = sys.modules["pip._vendor." + mod]
KeyError: 'pip._vendor.urllib3.contrib'

Pip 9.0.2 was literally released a couple hours ago as I write this, and it seems like pip changed its vendored packages around, including upgrading requests and explicitly vendoring urllib3 (see this commit).

However, this isn't a pip problem, this is a problem with using pip's vendored version of requests instead of an explicit dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions