Debugging piptools.exceptions.NoCandidateFound
See original GitHub issueIn trying to convert a fairly large project from requirements.txt
(201 lines) to start using pipenv
. The following took about 50 minutes to run (“Converting…” was very slow).
It ended with this piptools.exceptions.NoCandidateFound
error, that also happens any additional time I run pipenv install
now.
I assume this is due to some dependency version mismatch (which pip never complained about before). The problem is that there doesn’t seem to be an easy way to see which dependencies are asking for conflicting versions of Flask.
I was able to manually find and fix one of the conflicts by running pipdeptree -r -p Flask
in my old pip virtualenv, but now pipdeptree shows them as resolved, yet this error persists.
Is there some way to see the dependency tree or see which dependencies are causing this error? (As far as I know, all my deps should now be okay with Flask==0.9)
$ pipenv install
Requirements file found, instead of Pipfile! Converting...
No package provided, installing all dependencies.
Pipfile found at /Users/me/Sites/foo/Pipfile. Considering this to be the project home.
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Traceback (most recent call last):
File "/Users/philfreo/Library/Python/2.7/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 892, in install
do_init(dev=dev, allow_global=system, ignore_hashes=ignore_hashes, ignore_pipfile=ignore_pipfile, skip_lock=skip_lock)
File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 663, in do_init
do_lock(no_hashes=no_hashes)
File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 492, in do_lock
results = resolve_deps(deps, sources=project.sources)
File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/utils.py", line 49, in resolve_deps
for result in r.resolve():
File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 187, in _resolve_one_round
best_matches = set(self.get_best_match(ireq) for ireq in constraints)
File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 187, in <genexpr>
best_matches = set(self.get_best_match(ireq) for ireq in constraints)
File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 245, in get_best_match
best_match = self.repository.find_best_match(ireq, prereleases=self.prereleases)
File "/usr/local/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 116, in find_best_match
raise NoCandidateFound(ireq, all_candidates)
piptools.exceptions.NoCandidateFound: Could not find a version that matches Flask==0.9,>=0.10,>=0.7,>=0.8,>=0.9
Tried: 0.1, 0.2, 0.3, 0.3.1, 0.4, 0.5, 0.5.1, 0.5.2, 0.6, 0.6.1, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.9, 0.10, 0.10.1, 0.11, 0.11, 0.11.1, 0.11.1, 0.12, 0.12, 0.12.1, 0.12.1, 0.12.2, 0.12.2
I suppose this is a dupe of https://github.com/jazzband/pip-tools/issues/165, but I figured I’d start here because pipenv
causes this error while pip
isn’t.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (9 by maintainers)
Top GitHub Comments
oh it’s
lock --verbose
I have the same issue when trying to install a dev version of graphene:
This works with standard pip