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

ResolutionImpossible error when installing pytezos with pip #350

Closed
igorkh-fb opened this issue Nov 21, 2023 · 1 comment · Fixed by #351
Closed

ResolutionImpossible error when installing pytezos with pip #350

igorkh-fb opened this issue Nov 21, 2023 · 1 comment · Fixed by #351
Assignees
Labels
🚢 ci/cd Dockerfiles, GitHub Actions and stuff like that
Milestone

Comments

@igorkh-fb
Copy link

igorkh-fb commented Nov 21, 2023

Python version: 3.10.13
Pip version: 23.3.1
OS: Ubuntu Linux 20.04

When trying to install the latest version of pytezos (and also some earlier versions) into a fresh virtual environment via pip, the installation fails with a ResolutionImpossible error.

Steps to reproduce:

$ python3.10 -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip
$ pip install pytezos==3.10.2

After about 15-20 minutes this results in the output:


ERROR: Cannot install pytezos and pytezos==3.10.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.20.0 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.19.2 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.19.1 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.19.0 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.18.6 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.18.5 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.18.4 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.18.3 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.18.2 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.18.1 depends on attrs>=22.2.0
    pytezos 3.10.2 depends on attrs<22.0.0 and >=21.4.0
    cattrs 22.1.0 depends on attrs>=20
    jsonschema 4.18.0 depends on attrs>=22.2.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

This started happening recently (didn't happen in August for sure). Perhaps jsonschema have released enough new versions for it to go beyond how much pip's backtracking resolver is willing to go.

It is possible to achieve successful dependency resolution by providing a constraint on jsonschema to use its' last version which does not require attrs>=22.2.0:

pip install pytezos==3.10.2 jsonschema==4.17.3

Currently pytezos' dependency on attrs is "^21.4.0". Would it be to relax it to accept version 22.2?

@lukeisontheroad
Copy link

I can confirm, I run into the same issue, fixing the jsonschema dependency resolved my problem.

@droserasprout droserasprout self-assigned this Nov 25, 2023
@droserasprout droserasprout added the 🚢 ci/cd Dockerfiles, GitHub Actions and stuff like that label Nov 30, 2023
@droserasprout droserasprout added this to the 3.10.3 milestone Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚢 ci/cd Dockerfiles, GitHub Actions and stuff like that
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants