A Pipenv issue

Here is an issue I recently ran into with Pipenv. pipenv lock tells me it cannot resolve the websockets dependency, because there is no version both >6 and <6. Not the nicest error message, but it makes sense that it wouldn’t be able to resolve that. So what dependencies are responsible for this?

pipenv graph has says there there are two dependencies that pull in websockets:

sanic==0.7.0
– websockets [required: >=4.0, installed: 5.0.1]

web3
– websockets [required: >=6.0.0,<7.0.0, installed: 6.0]

What is the problem here? There should be a version of websockets that can satisfy both constraints, right?

It turns out that contrary to that output, which shows what is currently installed, pipenv lock actually tries to update sanic to a new version, with a different constraint. You can debug this using pipenv lock –verbose.