Open essandess opened 2 years ago
I tried to install to install tensorflow from source using the following command:
bazelisk build --copt=O3 --copt=-march-native :pip_pkg
I also get, on ubuntu, the same error:
mini-me@virtucon ~/h/c/probability (main)> bazelisk build --copt=O3 --copt=-march-native :pip_pkg
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/home/mini-me/home/cellar/probability/tools/bazel.rc
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:pip_pkg (150 packages loaded, 5196 targets configured).
ERROR: /home/mini-me/home/cellar/probability/tensorflow_probability/python/experimental/util/BUILD:35:27: Executing genrule //tensorflow_probability/python/experimental/util:rewrite___init___py_jax failed: (Exit 1): bash failed: error exe
cuting Genrule command (from target //tensorflow_probability/python/experimental/util:rewrite___init___py_jax) /bin/bash -c ... (remaining 1 argument skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Traceback (most recent call last):
File "/home/mini-me/.cache/bazel/_bazel_yziquel/7d4a81cb29695bb226fe1e3c59e64ae7/sandbox/linux-sandbox/3/execroot/_main/bazel-out/k8-opt-exec-ST-d57f47055a04/bin/tensorflow_probability/substrates/meta/rewrite.runfiles/_main/tensorflow_p
robability/substrates/meta/rewrite.py", line 20, in <module>
from absl import app
ModuleNotFoundError: No module named 'absl'
I do not know how all this fits in MacPorts, but this is what I get from source with Ubuntu.
I have the absl
module installed from the source abseil-py
git repository. In a pyenv
virtual environment. It seems bazel doesn't pick up the pyenv virtual environment infrastructure.
So. Two paths: 1. random tinkering till it works 2. getting into the nitty gritty of bazel.
I'm attempting to update
tensor flow_probability
for MacPorts.Version 0.17.0 fails to build on macOS with error:
This import issue may be caused by the fact that there is no
__init__.py
file in the directory ./tensorflow_probability/substrates/meta.I've tried adding my own
__init__.py
file to the source directory, but bazel appears to be downloading its own source, and I'm uncertain how to address or work around this issue.See also #539.