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

pip >= 10.0.0 incompatibility #689

Closed
james-powis opened this issue Apr 3, 2018 · 5 comments
Closed

pip >= 10.0.0 incompatibility #689

james-powis opened this issue Apr 3, 2018 · 5 comments

Comments

@james-powis
Copy link

I am not going to create these for every single napalm module... but did for napalm-automation/napalm-ansible#123 where I also saw this issue

pip 10.x no longer provides pip.req as needed in setup.py
pypa/pip#5156

@tkapluk
Copy link

tkapluk commented Apr 5, 2018

Hi.
I try to install napalm with python3:

$ pip3 install napalm
Collecting napalm
  Using cached napalm-2.3.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-hrv6t6f5/napalm/setup.py", line 6, in <module>
        from pip.req import parse_requirements
    ModuleNotFoundError: No module named 'pip.req'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-hrv6t6f5/napalm/
$ pip3 -V
pip 10.0.0b2 from /usr/local/lib/python3.6/dist-packages/pip-10.0.0b2-py3.6.egg/pip (python 3.6)

How to fix?

@dbarrosop
Copy link
Member

Downgrade to pip9. Version 10 is still in beta and has gone through some backwards incompatible changes we have to fix.

@tkapluk
Copy link

tkapluk commented Apr 5, 2018

I tried to use pip9, but on requirements: pip==10.0.0b2'.

pip3 install napalm
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 658, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 972, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 863, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (pip 9.0.1 (/usr/lib/python3/dist-packages), Requirement.parse('pip==10.0.0b2'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3049, in <module>
    @_call_aside
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3033, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3062, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 660, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 673, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 858, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==10.0.0b2' distribution was not found and is required by the application

@ktbyers
Copy link
Contributor

ktbyers commented Apr 5, 2018

You are going to have to figure out which package is requiring you to use the beta version of PIP10 and downgrade it (it might be setuptools itself).

Alternatively, you could just start over with completely new virtual environment (that has pip9 in it).

@tkapluk
Copy link

tkapluk commented Apr 5, 2018

On new virtual machine installed successfully. Thanks.

ogenstad added a commit to ogenstad/napalm that referenced this issue Apr 6, 2018
ktbyers pushed a commit that referenced this issue Apr 6, 2018
Fixes #689 pip10 compatibility issue
ExaneServerTeam pushed a commit to ExaneServerTeam/napalm that referenced this issue Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants