Skip to content

TF-2+Conda - TensorBoard doesn’t launch #1999

@diego898

Description

@diego898

System Information:

  • TensorBoard version: 1.14.0a20190301
  • TensorFlow version: 2.0.0-alpha and nightly, installed with pip
  • Using anaconda python distribution
  • OS Platform and version: CentOS 7
  • Python version: 3.6

Starting from a basic numpy/scikitlearn anaconda environment, I installed tensorflow 2 via pip. From that enviroment, launching tensorboard gives the following error:

ERROR: Failed to launch TensorBoard (exited with 1).
Contents of stderr:
Traceback (most recent call last):
  File "/home/mesada/.conda/envs/tf-2.0.0-alpha-cpu/bin/tensorboard", line 6, in <module>
    from tensorboard.main import run_main
  File "/home/mesada/.conda/envs/tf-2.0.0-alpha-cpu/lib/python3.6/site-packages/tensorboard/main.py", line 42, in <module>
    import tensorflow as tf  # pylint: disable=unused-import
  File "/home/mesada/.conda/envs/tf-2.0.0-alpha-cpu/lib/python3.6/site-packages/tensorflow/__init__.py", line 27, in <module>
    from tensorflow._api.v2 import audio
  File "/home/mesada/.conda/envs/tf-2.0.0-alpha-cpu/lib/python3.6/site-packages/tensorflow/_api/v2/audio/__init__.py", line 8, in <module>
    from tensorflow.python.ops.gen_audio_ops import decode_wav
  File "/home/mesada/.conda/envs/tf-2.0.0-alpha-cpu/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/home/mesada/.conda/envs/tf-2.0.0-alpha-cpu/lib/python3.6/site-packages/tensorflow/core/framework/graph_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "/home/mesada/.conda/envs/tf-2.0.0-alpha-cpu/lib/python3.6/site-packages/google/protobuf/descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/mesada/.conda/envs/tf-2.0.0-alpha-cpu/lib/python3.6/site-packages/google/protobuf/pyext/_message.cpython-36m-x86_64-linux-gnu.so)

The confusing part is the last line, where even though Im inside a conda enviroment, the last line indicates trying to use the system `/lib64/libstdc++.so.6:.

I was able to solve this by doing the following (thanks to this related SO question):

(tf-2.0.0-alpha-cpu) ➜  praxis ~ export LD_PRELOAD=$CONDA_PREFIX/lib/libstdc++.so

(tf-2.0.0-alpha-cpu) ➜  praxis ~ tensorboard --logdir /tmp/mnist
TensorBoard 1.14.0a20190301 at http://praxis.emp.vumc.io:6006 (Press CTRL+C to quit)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions