Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

py_image and overlapping module paths #1347

Closed
rockwotj opened this issue Dec 29, 2019 · 3 comments
Closed

py_image and overlapping module paths #1347

rockwotj opened this issue Dec 29, 2019 · 3 comments

Comments

@rockwotj
Copy link

For py image, I'm trying to use Firestore, so I have requirements like:

py3_image(
    name = "foo",
    srcs = ["foo.py"],
    deps = [
        requirement("cachetools"),
        requirement("certifi"),
        requirement("chardet"),
        requirement("future"),
        requirement("google-api-core"),
        requirement("google-auth"),
        requirement("google-cloud-core"),
        requirement("google-cloud-firestore"),
        requirement("googleapis-common-protos"),
        requirement("grpcio"),
        requirement("idna"),
        requirement("protobuf"),
        requirement("pyasn1-modules"),
        requirement("pyasn1"),
        requirement("pytz"),
        requirement("requests"),
        requirement("rsa"),
        requirement("s2sphere"),
        requirement("six"),
        requirement("urllib3"),
    ],
)

and I get an error for py_image:

    from google.cloud import firestore
ImportError: No module named 'google.cloud'

It seems looking at the available modules, only google.api_core exists, if I make the Firestore dep the first on the list, it seems that other google cloud packages don't exist. (basing this off import google; help(google);).

Is there a work around?

@rockwotj
Copy link
Author

Duplicate of bazelbuild/rules_python#65

@cdg720
Copy link

cdg720 commented Feb 11, 2020

@rockwotj did you find a way to fix this problem?

@rockwotj
Copy link
Author

Nope I think I came to conclusion that pip is not well supported in bazel and I switched languages

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

No branches or pull requests

2 participants