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.

Conflicting Dependencies

See original GitHub issue

This is reposted from an internal ticket. (Googlers: b/63062329)


Relevant PRs:

(Added by @dhermes for posterity)


Issue summary:

# Install google-cloud 0.25.0 in Ubuntu (16.04, 16.10, 17.04)
sudo apt-get update
sudo apt-get install python-pip
pip install google-cloud==0.25.0

# Its dependencies have conflicts
python -c "__requires__=['google-cloud']; import pkg_resources" <-- will receive error:

Here is the traceback:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 834, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (google-cloud-core 0.24.1 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('google-cloud-core<0.26dev,>=0.25.0'), set(['google-cloud-storage', 'google-cloud-logging', 'google-cloud-datastore']))

Workaround: Customer has reverted to 0.23.0 to build.

Very similar to #3331.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
dhermescommented, Jul 6, 2017

OK I’m going to send some fixes for this right now. I just pushed two branches:

corresponding to the existing “broken” tags:

$ git log -1 0.25.0 --pretty=%H
bd9fdfba07fac63a91847628613928a569250c0f
$ git log -1 0.26.0 --pretty=%H
214aba604fbcaa9e4936fa1798efde050389992a

I will send PRs (#3584, #3586, #3587, #3588) against them to create 0.25.1 and 0.26.1 tags, and then will delete those branches from the main repo once the new tags are created.

0reactions
tseavercommented, Jul 13, 2017

I was always suspicious of the “give me everything” usecase for the umbrella package, so +1 for losing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven: how to handle conflicting dependencies - Stack Overflow
The best way to force a specific version of the dependency is to explicitly define a dependency in the parent POM inside a...
Read more >
How to identify and resolve a dependency conflict
Find Divio's how-to guide to identifying and resolving a dependency conflict. Learn what steps to take if a deployment in the cloud or...
Read more >
Dependency Resolution - pip documentation v22.3.1
pip is capable of determining and installing the dependencies of packages. ... pip cannot install their specified packages due to conflicting dependencies.
Read more >
The Nine Circles of Python Dependency Hell - Medium
If you need a more detailed view of which dependencies are conflicting with each other, try installing and running pipdeptree. It will produce...
Read more >
Solving Dependency Conflicts in Maven - DZone
Maven dependency conflicts can be really hard to solve. ... be nice to have a tool that tests which libraries are conflicting in...
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