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

Compatible versions of pip-tools and pip #1089

Closed
atugushev opened this issue Mar 22, 2020 · 6 comments · Fixed by #1106
Closed

Compatible versions of pip-tools and pip #1089

atugushev opened this issue Mar 22, 2020 · 6 comments · Fixed by #1106
Labels
docs Documentation related help wanted Request help from the community

Comments

@atugushev
Copy link
Member

atugushev commented Mar 22, 2020

Since old pip versions are dropped (see #926) it would be useful to have a section in README which would help users find the version of pip-tools with support for a specific version of pip. It could be a table, for the instance:

  • pip-tools<=4.5.* compatible with pip>=8.1.1,<=20.0.*
  • pip-tools==5.0.* compatible with pip>=20.0,<=20.1.*
  • pip-tools==5.1.* compatible with pip>=20.1,<=20.2.*
  • pip-tools==5.2.* compatible with pip>=20.2.*
  • etc ...

Originally posted by @atugushev in #926 (comment)

@atugushev atugushev added docs Documentation related help wanted Request help from the community labels Mar 22, 2020
@atugushev atugushev changed the title It might be considered to be resolved. Recently though, we discussed privately with @vphilippon that it would be nice to have a section in README which would help users find the version of pip-tools with support for a specific version of pip. It could be a table, for the instance: Compatible versions of pip-tools and pip Mar 22, 2020
@adamchainz
Copy link
Contributor

It would also be good to have a runtime check that the current version is compatible with the current pip. One gets odd errors otherwise.

@atugushev
Copy link
Member Author

atugushev commented Mar 26, 2020

@adamchainz that makes sense. Actually, we had this check before. See 2a21f6e.

@adamchainz
Copy link
Contributor

Cool. Any idea why it was removed?

@atugushev
Copy link
Member Author

@adamchainz it was removed later because of pip vendoring.

@atugushev
Copy link
Member Author

On the other hand, the default failure message is pretty informative.

$ pip install pip==19.3.1

$ pip-compile
Traceback (most recent call last):
  File "/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 792, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pip 19.3.1 (/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages), Requirement.parse('pip>=20.0'), {'pip-tools'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/albert/Projects/pip-tools/.venv/bin/pip-compile", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3254, in <module>
    def _initialize_master_working_set():
  File "/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3237, in _call_aside
    f(*args, **kwargs)
  File "/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 586, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 599, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/Users/albert/Projects/pip-tools/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip>=20.0' distribution was not found and is required by pip-tools

@adamchainz
Copy link
Contributor

Thanks @atugushev

Yes the error message is informative. I think the case I saw with odd runtime errors was with an old pip, python, or pip-tools version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related help wanted Request help from the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants