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.

[python-client 2.6.0] ContextualVersionConflict grpcio dependency conflict

See original GitHub issue

Describe the bug When installing pulsar-client==2.6.0 there’s a dependency conflict with grpcio library.

The dependency tree is (as I understand it):

  • pulsar-client (2.6.0)
    • grpcio (any)
    • apache-bookkeeper-client (4.11.0)
      • grpcio >=1.8.2,<1.26.0

To Reproduce Steps to reproduce the behavior:

  1. pip install pulsar-client==2.6.0
  2. grpcio==1.30.0 gets installed
  3. If I try to build my own pip package with pulsar-client as dependency, and try to build it, I get the ContextualVersionConflict error

Expected behavior I expect the correct version to be installed and/or the dependency tree to be fixed.

Screenshots Screenshot from 2020-07-08 09-17-09

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lbenc135commented, Jul 16, 2020

@sijie It’s a bit complicated because it involves having a python package which requires another python package.

Basically it seems the problem is that in version 4.11.0 of apache-bookkeeper-client there was an explicit requirement added: grpcio<1.26.0, while in 4.10.0 this was only >=1.8.2. Since pulsar-client itself requires grpcio, but does not specify a version, pip installs the newest (maybe the solution is removing this dependency?).

Setuptools verifies all the dependencies of my python package and throws this error.

I temporarily solved it by explicitly adding grpcio==1.25.0 in my requirements.txt.

0reactions
jbelliscommented, Feb 10, 2021

I ran into this today.

It looks like BookKeeper revved its requirement to include up to 1.28, but in the meantime grpcio released even more versions which are not compatible (1.35 is the latest now).

I think Pulsar client needs to specify a grpcio version that matches a version compatible with the appropriate BK release.

Until then the Python client is effectively uninstallable for the majority of people trying to follow the docs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

subject:"\[GitHub\] \[pulsar\] lbenc135 commented ... - The Mail Archive
[GitHub] [pulsar] lbenc135 commented on issue #7477: [python-client 2.6.0] ContextualVersionConflict grpcio dependency conflict · 2020-07-17 Thread GitBox.
Read more >
Python pip install Contextual Version Conflict | by Akbar B
Python pip install Contextual Version Conflict ... This is because pip will change the way that it resolves dependency conflicts.
Read more >
import surprise throws ContextualVersionConflict error in ...
We do not currently allow content pasted from ChatGPT on Stack Overflow; read our policy here. import surprise throws ContextualVersionConflict ...
Read more >
apache_beam_hello_world_stac...
# Setup default credentials. # JSON loaded from Google Drive auth.authenticate_user()
Read more >
google-cloud-datastore | based Java and Python client libraries
google-cloud-datastore has no vulnerabilities reported, and its dependent libraries ... ContextualVersionConflict using BigQuery in AI-Platform-Notebooks.
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