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 20.3.3: TypeError: make_requirement_preparer() got an unexpected keyword argument 'wheel_download_dir' #1307

Closed
marcelloromani opened this issue Jan 21, 2021 · 3 comments
Labels
support User support

Comments

@marcelloromani
Copy link

marcelloromani commented Jan 21, 2021

$ pip-compile --allow-unsafe --generate-hashes requirements.txt

Traceback (most recent call last):
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/bin/pip-compile", line 8, in <module>
    sys.exit(cli())
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/piptools/scripts/compile.py", line 458, in cli
    results = resolver.resolve(max_rounds=max_rounds)
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/piptools/resolver.py", line 173, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/piptools/resolver.py", line 278, in _resolve_one_round
    their_constraints.extend(self._iter_dependencies(best_match))
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/piptools/resolver.py", line 388, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/piptools/repositories/local.py", line 75, in get_dependencies
    return self.repository.get_dependencies(ireq)
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/piptools/repositories/pypi.py", line 231, in get_dependencies
    self._dependencies_cache[ireq] = self.resolve_reqs(
  File "/Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/piptools/repositories/pypi.py", line 155, in resolve_reqs
    preparer = self.command.make_requirement_preparer(
TypeError: make_requirement_preparer() got an unexpected keyword argument 'wheel_download_dir'

Environment Versions

  1. OS Type: Mac OS Big Sur 11.1
  2. Python version: $ python -V Python 3.8.6
  3. pip version: $ pip --version pip 20.3.3 from /Users/marcelloromani/dev/xcov19/covidX/venv/lib/python3.8/site-packages/pip (python 3.8)
  4. pip-tools version: $ pip-compile --version pip-compile, version 5.3.1

Steps to replicate

$ pip-compile --allow-unsafe --generate-hashes requirements.txt

The error appears immediately.

Similar to #1228

@atugushev
Copy link
Member

Hello @marcelloromani,

Could you upgrade pip-tools to the latest 5.5.0 version?

$ python -m pip install --upgrade pip-tools

@atugushev atugushev added the support User support label Jan 21, 2021
@marcelloromani
Copy link
Author

Requirement already satisfied: pip-tools in ./venv/lib/python3.8/site-packages (5.3.1)
Collecting pip-tools
  Using cached pip_tools-5.5.0-py2.py3-none-any.whl (45 kB)
Requirement already satisfied: click>=7 in ./venv/lib/python3.8/site-packages (from pip-tools) (7.1.2)
Requirement already satisfied: pip>=20.1 in ./venv/lib/python3.8/site-packages (from pip-tools) (20.3.3)
Installing collected packages: pip-tools
  Attempting uninstall: pip-tools
    Found existing installation: pip-tools 5.3.1
    Uninstalling pip-tools-5.3.1:
      Successfully uninstalled pip-tools-5.3.1
Successfully installed pip-tools-5.5.0```

That did the trick, thanks!

@marcelloromani
Copy link
Author

Solution: upgrade pip-tools to latest version, 5.5.0 at the time of writing:

$ python -m pip install --upgrade pip-tools

dals83 pushed a commit to magenta-aps/os2datascanner that referenced this issue Feb 1, 2021
- Dockerfile for API

- Switch to using latest pip-tools to fix error, add api req compilation

jazzband/pip-tools#1307

- API service in dev environment

- Swagger UI service in dev environment (currently using static swagger.yaml - _not_ for production usage)
dals83 pushed a commit to magenta-aps/os2datascanner that referenced this issue Feb 1, 2021
- Dockerfile for API

- Switch to using latest pip-tools to fix error, add api req compilation

jazzband/pip-tools#1307

- API service in dev environment

- Swagger UI service in dev environment (currently using static swagger.yaml - _not_ for production usage)
dals83 pushed a commit to magenta-aps/os2datascanner that referenced this issue Feb 2, 2021
- Dockerfile for API

- Switch to using latest pip-tools to fix error, add api req compilation

jazzband/pip-tools#1307

- API service in dev environment

- Swagger UI service in dev environment (currently using static swagger.yaml - _not_ for production usage)
dals83 pushed a commit to magenta-aps/os2datascanner that referenced this issue Feb 2, 2021
- Dockerfile for API

- Switch to using latest pip-tools to fix error, add api req compilation

jazzband/pip-tools#1307

- API service in dev environment

- Swagger UI service in dev environment (currently using static swagger.yaml - _not_ for production usage)
dals83 pushed a commit to magenta-aps/os2datascanner that referenced this issue Feb 4, 2021
- Dockerfile for API

- Switch to using latest pip-tools to fix error, add api req compilation

jazzband/pip-tools#1307

- API service in dev environment

- Swagger UI service in dev environment (currently using static swagger.yaml - _not_ for production usage)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support User support
Projects
None yet
Development

No branches or pull requests

2 participants