question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not find a version that matches with latest version of Mypy and Pylint

See original GitHub issue

Follow up of #2785 (and probably other).

Got the same good-old “resolver issue” again today:

  • pylint 2.3.0 was released today on Pypi.
  • pylint 2.3.0 wants astroid>=2.2.0
  • astroid 2.2.0 want typed-ast>=1.4.0

In my pipfile I also have pylint = "*" and mypy = "*".

And latest version of mypy want typed-ast<1.4.0. So the resolver on pipenv update --clear fails witht the infamous error:

Could not find a version that matches typed-ast<1.3.0,<1.4.0,>=1.3.1

In short: as of today, latest versions of mypy and pylint packages have incompatible dependencies.

Fixing by add this in the Pipfile:

pylint = "<2.3.0"
typed-ast = "<1.4.0,>=1.3.1"
astroid = "<2.2.0"

To prevent update of pylint.

I understand digging into the resolver is a really complex task, and I tried it and failed at doing anything relevant, but still, I hope one good lad here find time to dig into this and find a way to have pipenv finds itself it should not take the latest version of pylint package in this case, and try with a previous version.

Expected behavior:

  • pylint version is updated, the resolver fails at the end with “Could not find a version” error.
  • previous versions available on pypi is tried, and so on, until the same version that were on Pipfile.lock. If not present, a depth limit may be set to avoid to try every version of pylint package
  • even in case of failure, pipenv update --clear should end in success (providing the lock file is still coherent) but add an explicit warning telling 2 packages have incompatible dependency rule in their latest version available on Pypi.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
superdev810commented, Feb 28, 2019

@gsemet did you try to force to set mypy==0.660 in Pipfile? I think after mypy pacakge updated in Feb 9, it’s happening nowadays.

1reaction
techalchemycommented, Mar 5, 2019

we have the OK to incorporate passa, but we have a lot of legwork to do first cleaning up other issues. The issue here is just that piptools doesn’t backtrack to resolve conflicts after it makes a decision. Passa handles that issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix pipenv error: Could not find a version that matches?
2 Answers 2 · remove Pipefile.lock · run pipenv --rm (to remove the pipenv shell I was in) · run pip install pipenv...
Read more >
Fix the pip error: Couldn't find a version that satisfies the ...
The package is not present on PyPI server. In this case pip will not work. So you'll have to download and install the...
Read more >
Common issues and solutions - mypy 0.991 documentation
Using a development mypy build​​ You can install the latest development version of mypy from source. Clone the mypy repository on GitHub, and...
Read more >
Pylint - PyPI
Pylint is a static code analyser for Python 2 or 3. The latest version supports Python 3.7.2 and above. Pylint analyses your code...
Read more >
MyPy - PyDev
To activate it, go to the MyPy preferences page, and then check Use MyPy. ... the PyDev code analysis can work on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found