dmlc / tensorboard

Standalone TensorBoard for visualizing in deep learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: _pywrap_tensorflow.so: Symbol not found: _PyBytes_AsString

petertulala opened this issue · comments

I've tried to install tensorboard on Python 3.6 (macOS Sierra 10.12.6) both using pip3 install tensorboard or build from source. In both cases I'm getting this error:

> tensorboard --logdir=/tmp/tb
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/tensorboard/tensorboard.py", line 32, in <module>
    from tensorflow.python.summary import event_file_inspector as efi
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/summary/event_file_inspector.py", line 122, in <module>
    from tensorflow.python.platform import gfile
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/platform/gfile.py", line 22, in <module>
    from tensorflow.python.lib.io.file_io import copy as Copy
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/lib/io/file_io.py", line 27, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow.so, 2): Symbol not found: _PyBytes_AsString
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow.so
  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow.so

Did I miss something?

Related issue on stackoverflow (not resolved): https://stackoverflow.com/questions/44895394/cant-run-tensorboard-because-of-symbol-not-found-pybytes-asstring

It works fine in Python2.7, have you verified this?

Same error in Python3.5.

commented

Same error here, I installed tensorboard on Debian, I did a native install with pip3 and it never worked. This is the log error:

$ tensorboard
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/tensorboard/tensorboard.py", line 32, in <module>
    from tensorflow.python.summary import event_file_inspector as efi
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/summary/event_file_inspector.py", line 122, in <module>
    from tensorflow.python.platform import gfile
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/platform/gfile.py", line 22, in <module>
    from tensorflow.python.lib.io.file_io import copy as Copy
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/lib/io/file_io.py", line 27, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: /usr/local/lib/python3.5/dist-packages/tensorboard/tensorboard.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow.so: undefined symbol: PyBytes_AsStringAndSize```
commented

same error

same error.
Is there a fix for this?

I am getting the same error on macOS Sierra 10.12.6, Python 3.5.1

I am getting the same error. Is there any fix for this?

I was able to get tensorflow-tensorboard working on Ubuntu 16.04 as well as OS X (Sierra),
(until tensorboard is officially supported with tensorflow 1.3):

Here's what I did:

Step 1: uninstall tensorboard

pip3 uninstall tensorboard

Step 2: install tensorflow-tensorboard

pip3 install tensorflow-tensorboard

Step 3: verify installation

pip3 list | grep tensor

tensorflow-gpu (1.3.0)
tensorflow-tensorboard (0.1.6)

Step 4: Run tensoboard with your directory...

tensorboard --logdir=

Hey guys, it is said that Google asked them stopping work on this project. So, this bug may not be fixed.

I recommend you guys try building it from source. It looks like something wrong during compile the backend, which we didn't change the code.

@SamaelChen We're stilling working in this project, trying to provide a framework independent TensorBoard. We just remove the PyPI and don't use the name tensorboard in PyPI anymore.

BTW, I'm trying another way to compile stand-alone TensorBoard based on tensorflow/tensorbaord, refer here https://github.com/zihaolucky/tensorboard-lite if you want, the code in master branch works same as the functions we've provided. (The code there is for experiment, we would merge the code back to here after we stabilize the code) And we're going to support embedding and more features. Thanks!

same error

@poem0207 Did you use the latest code in master?