coala / coala-bears

Bears for coala
https://coala.io/
GNU Affero General Public License v3.0
295 stars 580 forks source link

install fails with pipenv under python 3.6, via pyyaml #2981

Closed gruns closed 3 years ago

gruns commented 3 years ago

error:

[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches pyyaml>=5.3.1,~=3.12 (from coala-bears==0.11.1->-r /tmp/pipenv4lla46zvrequirements/pipenv-8yibqyu8-constraints.txt (line 2))
Tried: 3.10, 3.10, 3.11, 3.11, 3.12, 3.12, 3.13, 5.1, 5.1.1, 5.1.2, 5.2, 5.3, 5.3.1, 5.4, 5.4, 5.4.1, 5.4.1
Skipped pre-versions: 3.13b1, 3.13rc1, 4.2b1, 4.2b2, 4.2b4, 5.1b1, 5.1b3, 5.1b5, 5.2b1, 5.3b1, 5.4b1, 5.4b1, 5.4b2, 5.4b2
There are incompatible versions in the resolved dependencies:
  pyyaml (from yamllint==1.6.1->coala-bears==0.11.1->-r /tmp/pipenv4lla46zvrequirements/pipenv-8yibqyu8-constraints.txt (line 2))
  pyyaml>=5.3.1 (from bandit==1.7.0->coala-bears==0.11.1->-r /tmp/pipenv4lla46zvrequirements/pipenv-8yibqyu8-constraints.txt (line 2))
  pyyaml~=3.12 (from coala-bears==0.11.1->-r /tmp/pipenv4lla46zvrequirements/pipenv-8yibqyu8-constraints.txt (line 2))

to reproduce:

$ pipenv --python 3.6
$ pipenv install coala-bears

latest pipenv, version 2020.11.15

anshalshukla commented 3 years ago

Hey @gruns, pipenv 2020.11.15 requires pip>=18.0, but coala-bears requires pip>9, <10, so if you try running this with the downgraded pip, it should work fine.

anshalshukla commented 3 years ago

I tried running it in virtualenv, and a similar error pops up there as well. This is particularly because the latest version of bandit(1.7) requires pyyaml >=5.3.1. So while installing the dependencies, it auto upgrades the pyyaml, causing this error.