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-compile does not work with pip==22.0 and newer #1639

Closed
Behoston opened this issue Jun 22, 2022 · 2 comments
Closed

pip-compile does not work with pip==22.0 and newer #1639

Behoston opened this issue Jun 22, 2022 · 2 comments

Comments

@Behoston
Copy link

Environment Versions

  1. Linux Mint
  2. Python version: Python 3.9.13
  3. pip version: pip 22.0 from /home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/pip (python 3.9)
  4. pip-compile, version 6.4.0

Steps to replicate

Run pip-compile

Actual result

Traceback (most recent call last):
  File "/home/behoston/venv/dostanesie_django_39/bin/pip-compile", line 8, in <module>
    sys.exit(cli())
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/piptools/scripts/compile.py", line 342, in cli
    repository = PyPIRepository(pip_args, cache_dir=cache_dir)
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/piptools/repositories/pypi.py", line 106, in __init__
    self._setup_logging()
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/piptools/repositories/pypi.py", line 455, in _setup_logging
    assert isinstance(handler, logging.StreamHandler)
AssertionError

With newest pip version (22.1.2) actual error is different:

Traceback (most recent call last):
  File "/home/behoston/venv/dostanesie_django_39/bin/pip-compile", line 5, in <module>
    from piptools.scripts.compile import cli
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/piptools/scripts/compile.py", line 21, in <module>
    from ..repositories import LocalRequirementsRepository, PyPIRepository
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/piptools/repositories/__init__.py", line 1, in <module>
    from .local import LocalRequirementsRepository
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/piptools/repositories/local.py", line 14, in <module>
    from .pypi import PyPIRepository
  File "/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/piptools/repositories/pypi.py", line 22, in <module>
    from pip._internal.cli.progress_bars import BAR_TYPES
ImportError: cannot import name 'BAR_TYPES' from 'pip._internal.cli.progress_bars' (/home/behoston/venv/dostanesie_django_39/lib/python3.9/site-packages/pip/_internal/cli/progress_bars.
@AndydeCleyre
Copy link
Contributor

Please see the Versions and compatibility table at the bottom of the readme. To use the latest pip, you'll need to upgrade pip-tools.

@Behoston
Copy link
Author

Behoston commented Jun 22, 2022

my bad. I thought I updated pip-tools to newest version before upgrading pip.

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

2 participants