ImportError for py_test depending on library, with identical setup #5115
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-Rules-Python
Native rules for Python
type: bug
Description of the problem / feature request:
I have a Bazel BUILD file, which contains two trivial Python py_tests, one importing tensorflow and the other importing numpy. Both build successfully but the Tensorflow one fails with a Tensorflow ImportError
The
test_numpy
test is simply:while the
test_tensorflow
is almost identical in the patternThe requirements are being fetched from a
requirements.txt
, which has the following lines:However, the numpy one passes just fine, whereas the tensorflow one does not. Both build successfully. I get the following error:
Feature requests: what underlying problem are you trying to solve with this feature?
Trying to test functions which depend on Tensorflow and Numpy within a Bazel project. The numpy imports work, but the Tensorflow ones do not.
What operating system are you running Bazel on?
Ubuntu 16.04
What's the output of
bazel info release
?release 0.12.0
Any other information, logs, or outputs that you want to share?
As I said, they both build fine.
If I cd into the test_tensorflow.runfiles/ I get the following pypi folders:
If I cd into the test_numpy.runfiles/ I get the following pypi folders:
I tried different versions of tensorflow as well, but the problem is the same.
The text was updated successfully, but these errors were encountered: