Skip to content
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.

ImportError: _pywrap_tensorflow.so: Symbol not found: _PyBytes_AsString #52

Open
petertulala opened this issue Aug 17, 2017 · 13 comments
Open

Comments

@petertulala
Copy link

petertulala commented Aug 17, 2017

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

@zihaolucky
Copy link
Member

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

@SamaelChen
Copy link

Same error in Python3.5.

@usr-ein
Copy link

usr-ein commented Sep 2, 2017

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```

@Jfeng3
Copy link

Jfeng3 commented Sep 6, 2017

same error

@renukemendis
Copy link

same error.
Is there a fix for this?

@arorahardeep
Copy link

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

@jonbronson
Copy link

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

@renukemendis
Copy link

renukemendis commented Sep 18, 2017

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=

@SamaelChen
Copy link

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

@zihaolucky
Copy link
Member

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.

@zihaolucky
Copy link
Member

zihaolucky commented Sep 18, 2017

@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!

@bo-ke
Copy link

bo-ke commented Oct 31, 2017

same error

@zihaolucky
Copy link
Member

@poem0207 Did you use the latest code in master?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants