google-cloud-python: Conflicting Dependencies

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.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (14 by maintainers)

Commits related to this issue

Most upvoted comments

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.