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

Can't install google-cloud via pip-compile #497

Closed
scjody opened this issue Apr 24, 2017 · 7 comments
Closed

Can't install google-cloud via pip-compile #497

scjody opened this issue Apr 24, 2017 · 7 comments

Comments

@scjody
Copy link

scjody commented Apr 24, 2017

pip-compile fails when requirements.in contains google-cloud.

Environment Versions
  1. OS Type: Ubuntu 14.04.05 LTS
  2. Python version: $ python -V: Python 2.7.6
  3. pip version: $ pip --version: pip 8.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)
  4. pip-tools version: $ pip-compile --version pip-compile, version 1.9.0
Steps to replicate
  1. mkdir /tmp/pip-compile
  2. echo google-cloud > requirements.in
  3. pip-compile
Expected result

A requirements.txt file is generated containing google-cloud and its dependencies.

Actual result
vagrant@vagrant:/tmp/pip-compile$ pip-compile
Could not find a version that matches google-cloud-logging<0.25dev,<2.0dev,>=0.24.0,>=1.0.0
Tried: 0.20.0, 0.20.0, 0.21.0, 0.21.0, 0.22.0, 0.22.0, 0.23.0, 0.23.0, 0.23.1, 0.23.1, 0.24.0, 0.24.0, 1.0.0, 1.0.0

Note that pip install google-cloud (without pip-tools) succeeds.

@j-walker23
Copy link

Do you have oauth2client==4.0.0? Mine also fails unless i go down to oauth2client==3.0.0. I can not find any way to force pip-compile. Is there a way?

@scjody
Copy link
Author

scjody commented Apr 25, 2017

@j-walker23 The machine I'm currently trying to run pip-compile on has oauth2client==3.0.0. Upgrading to 4.0.0 or removing oauth2client completely does not affect my ability to run pip-compile as shown above.

@davidovich
Copy link
Contributor

I believe the sub-dependencies are pinned incorrectly for this package.

If I run:

echo google-cloud | pip-compile -v -U -o req.txt - | grep google-cloud-logging

We can see the culprit in the output:

google-cloud-error-reporting==0.24.1 requires gapic-google-cloud-error-reporting-v1beta1<0.16dev,>=0.15.0, google-cloud-core<0.25dev,>=0.24.0, google-cloud-logging<2.0dev,>=1.0.0

google-cloud-error-reporting==0.24.1 requires google-cloud-logging<2.0dev,>=1.0.0. This constraint cannot be satisfied, so there is currently no solution.

A workaround would be to pin arificially the dependency that requires google-cloud-logging>=1.0.0:

echo -e 'google-cloud\ngoogle-cloud-error-reporting<=0.24' | pip-compile -v -U -o req.txt -

@j-walker23
Copy link

Thanks for your help @davidovich!

@davidovich
Copy link
Contributor

Closing as not a defect in pip-tools (but it is probably a defect of google-cloud package versioning)

@scjody
Copy link
Author

scjody commented Apr 27, 2017

There's already a google-cloud issue open - see above.

I thought that any dependencies that pip could deal with would also work with pip-compile. Sorry I was mistaken.

@davidovich
Copy link
Contributor

Pip does not do constraint validation, so it is possible to install conflicting packages. These conflicts may or may not allow correct runtime behaviour, but pip-tools will fail because the constraints are the only contract that it can follow. It is telling you that you have an invalid configuration (according to the authors of the sum of sub packages).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants