Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 690244 - sci-libs/tensorflow-estimator-1.14.0_rc1: ImportError: No module named tensorflow.python.tools.api.generator
Summary: sci-libs/tensorflow-estimator-1.14.0_rc1: ImportError: No module named tensor...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-19 21:02 UTC by Daniel M. Weeks
Modified: 2019-12-09 04:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel M. Weeks 2019-07-19 21:02:10 UTC
sci-libs/tensorflow-estimator build fails if there is a mismatch between the system default python version and PYTHON_TARGETS. For example, if the system python version is set to 2.7 and tensorflow/tensorflow-estimator are built without PYTHON_TARGETS="python2_7" the tensorflow-estimator build will fail as it just calls the system python during the build.

>>> Compiling source in /tmp/portage/sci-libs/tensorflow-estimator-1.14.0_rc1/work/estimator-1.14.0-rc1 ...
bazel --bazelrc=/tmp/portage/sci-libs/tensorflow-estimator-1.14.0_rc1/temp/bazelrc --output_base=/tmp/portage/sci-libs/tensorflow-estimator-1.14.0_rc1/work/estimator-1.14.0-rc1-bazel-base build //tensorflow_estimator/tools/pip_package:build_pip_package
Extracting Bazel installation...
WARNING: ignoring LD_PRELOAD in environment.
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
INFO: Analysed target //tensorflow_estimator/tools/pip_package:build_pip_package (23 packages loaded, 347 targets configured).
INFO: Found 1 target...
ERROR: /tmp/portage/sci-libs/tensorflow-estimator-1.14.0_rc1/work/estimator-1.14.0-rc1/tensorflow_estimator/python/estimator/api/BUILD:45:1: Executing genrule //tensorflow_estimator/python/estimator/api:estimator_python_api_gen_compat_v2 failed (Exit 1): bash failed: error executing command
  (cd /tmp/portage/sci-libs/tensorflow-estimator-1.14.0_rc1/work/estimator-1.14.0-rc1-bazel-base/execroot/org_tensorflow_estimator && \
  exec env - \
    HOME=/tmp/portage/sci-libs/tensorflow-estimator-1.14.0_rc1/homedir \
    PATH=/usr/lib64/ccache/bin:/usr/lib/portage/python3.6/ebuild-helpers/xattr:/usr/lib/portage/python3.6/ebuild-helpers:/usr/lib/llvm/8/bin:/usr/lib/llvm/7/bin:/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/opt/cuda/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow_estimator/python/estimator/api/create_tensorflow_estimator.python.estimator_api_2_estimator_python_api_gen_compat_v2  --apidir=bazel-out/k8-opt/genfiles/tensorflow_estimator/python/estimator/api_v2/ --apiname=estimator --apiversion=2  --package=tensorflow_estimator.python.estimator --output_package=tensorflow_estimator.python.estimator.api._v2 bazel-out/k8-opt/genfiles/tensorflow_estimator/python/estimator/api/_v2/v2.py bazel-out/k8-opt/genfiles/tensorflow_estimator/python/estimator/api/_v2/estimator/__init__.py bazel-out/k8-opt/genfiles/tensorflow_estimator/python/estimator/api/_v2/estimator/experimental/__init__.py bazel-out/k8-opt/genfiles/tensorflow_estimator/python/estimator/api/_v2/estimator/export/__init__.py bazel-out/k8-opt/genfiles/tensorflow_estimator/python/estimator/api/_v2/estimator/inputs/__init__.py')
Execution platform: @bazel_tools//platforms:host_platform
Traceback (most recent call last):
  File "/tmp/portage/sci-libs/tensorflow-estimator-1.14.0_rc1/work/estimator-1.14.0-rc1-bazel-base/execroot/org_tensorflow_estimator/bazel-out/host/bin/tensorflow_estimator/python/estimator/api/create_tensorflow_estimator.python.estimator_api_2_estimator_python_api_gen_compat_v2.runfiles/org_tensorflow_estimator/tensorflow_estimator/python/estimator/api/create_python_api_wrapper.py", line 26, in <module>
    from tensorflow.python.tools.api.generator import create_python_api
ImportError: No module named tensorflow.python.tools.api.generator
Target //tensorflow_estimator/tools/pip_package:build_pip_package failed to build

Reproducible: Always
Comment 1 Jason Zaman gentoo-dev 2019-12-09 04:34:17 UTC
I've dropped tf-1.14 from the tree, please file a new bug/reopen if this still happens :)