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

pex 1.5.1 bombs at runtime with missing deps error when extras are transitively pulled in for existing packages with concrete requirement specs in the resolve scope #616

Closed
kwlzn opened this issue Nov 2, 2018 · 2 comments
Assignees

Comments

@kwlzn
Copy link
Contributor

kwlzn commented Nov 2, 2018

repro:

[omerta show]$ wget -q https://github.com/pantsbuild/pex/releases/download/v1.5.1/pex27 -O pex27-1.5.1
[omerta show]$ ./pex27-1.5.1 apache-beam==2.7.0 tensorflow-transform==0.9.0
Failed to execute PEX file, missing macosx_10_14_x86_64-cp-27-cp27m compatible dependencies for:
apache-beam
proto-google-cloud-datastore-v1

the tensorflow-transform==0.9.0 wheel appears to specify a transitive dep on:

Requires-Dist: apache-beam[gcp] (<3,>=2.6)

which seems to be gumming up the runtime-side resolve in pex.

this can apparently be worked around by explicitly specifying the extra in the requirement specs:

[omerta show]$ wget -q https://github.com/pantsbuild/pex/releases/download/v1.4.4/pex27 -O pex27-1.4.4
[omerta show]$ ./pex27-1.4.4 apache-beam[gcp]==2.7.0 tensorflow-transform==0.9.0
Python 2.7.15 (default, Jun 20 2018, 17:40:09) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> 

but in current pex versions is blocked by #615 for this particular case.

@kwlzn kwlzn changed the title pex 1.5.1 bombs at runtime with missing deps error when extras are transitively pulled in pex 1.5.1 bombs at runtime with missing deps error when extras are transitively pulled in for existing packages with concrete requirement specs Nov 2, 2018
@kwlzn kwlzn changed the title pex 1.5.1 bombs at runtime with missing deps error when extras are transitively pulled in for existing packages with concrete requirement specs pex 1.5.1 bombs at runtime with missing deps error when extras are transitively pulled in for existing packages with concrete requirement specs in the resolve scope Nov 2, 2018
@jsirois jsirois mentioned this issue Nov 3, 2018
@jsirois jsirois mentioned this issue Dec 6, 2018
@jsirois jsirois mentioned this issue Jan 23, 2019
3 tasks
@jsirois jsirois mentioned this issue Feb 6, 2019
2 tasks
@jsirois jsirois mentioned this issue Mar 10, 2019
3 tasks
@jsirois jsirois self-assigned this Nov 14, 2019
@jsirois
Copy link
Member

jsirois commented Nov 14, 2019

Noting that pip has the exact same problem. Using 19.3.1 I find:

pip install apache-beam[gcp]==2.7.0 tensorflow-transform==0.9.0
pip freeze > orig.requirement.txt
pip install apache-beam[gcp]==2.7.0 tensorflow-transform==0.9.0
...
ERROR: proto-google-cloud-pubsub-v1 0.15.4 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.3 which is incompatible.
ERROR: gapic-google-cloud-pubsub-v1 0.15.4 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.3 which is incompatible.
ERROR: googledatastore 7.0.1 has requirement httplib2<0.10,>=0.9.1, but you'll have httplib2 0.11.3 which is incompatible.
ERROR: googledatastore 7.0.1 has requirement oauth2client<4.0.0,>=2.0.1, but you'll have oauth2client 4.1.3 which is incompatible.
ERROR: google-gax 0.15.16 has requirement future<0.17dev,>=0.16.0, but you'll have future 0.18.2 which is incompatible.
ERROR: proto-google-cloud-datastore-v1 0.90.4 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.3 which is incompatible.
...
pip freeze > hinted.requirement.txt
$ diff -u orig.requirement.txt hinted.requirement.txt 
--- orig.requirement.txt	2019-11-13 16:40:26.332126971 -0800
+++ hinted.requirement.txt	2019-11-13 16:41:15.057111014 -0800
@@ -1,6 +1,7 @@
 absl-py==0.8.1
 apache-beam==2.7.0
 avro==1.9.1
+cachetools==3.1.1
 certifi==2019.9.11
 chardet==3.0.4
 crcmod==1.7
@@ -8,18 +9,33 @@
 docopt==0.6.2
 enum34==1.1.6
 fastavro==0.19.7
+fasteners==0.15
 funcsigs==1.0.2
 future==0.18.2
 futures==3.3.0
+gapic-google-cloud-pubsub-v1==0.15.4
+google-apitools==0.5.20
+google-auth==1.7.1
+google-auth-httplib2==0.0.3
+google-cloud-bigquery==0.25.0
+google-cloud-core==0.25.0
+google-cloud-pubsub==0.26.0
+google-gax==0.15.16
 googleapis-common-protos==1.6.0
+googledatastore==7.0.1
+grpc-google-iam-v1==0.11.4
 grpcio==1.25.0
 hdfs==2.5.8
 httplib2==0.11.3
 idna==2.8
 mock==2.0.0
+monotonic==1.5
 numpy==1.16.5
 oauth2client==4.1.3
 pbr==5.4.3
+ply==3.8
+proto-google-cloud-datastore-v1==0.90.4
+proto-google-cloud-pubsub-v1==0.15.4
 protobuf==3.10.0
 pyasn1==0.4.7
 pyasn1-modules==0.2.7

@jsirois
Copy link
Member

jsirois commented Mar 22, 2022

The resolve takes ridiculously long, but this now works using the pip-2020-resolver. It still fails using the pip-legacy-resolver:

$ pex --python python2.7 --resolver-version pip-2020-resolver apache-beam==2.7.0 tensorflow-transform==0.9.0
Python 2.7.18 (default, Oct 10 2021, 22:29:32) 
[GCC 11.1.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import apache_beam as beam
>>> print(beam.__file__)
/home/jsirois/.pex/installed_wheels/4aa6e7f3726627d7c2c3b9ea9cf232bca5b9ada56de2e8ef482bf56324a87289/apache_beam-2.7.0-cp27-cp27mu-manylinux1_x86_64.whl/apache_beam/__init__.py
>>> 
^jsirois@gill ~/dev/pantsbuild/jsirois-pex (issues/1670) $ pex -V
2.1.72

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

No branches or pull requests

2 participants