gpt4 book ai didi

python - 通过 pip 安装后 Tensorboard 错误

转载 作者:太空宇宙 更新时间:2023-11-04 05:06:36 25 4
gpt4 key购买 nike

我最近尝试安装 tensorboard通过 README.md 中详述的 pip。安装被认为是成功的,但是当我在安装后尝试运行 tensorboard 时,我不断收到导入/ undefined symbol 错误,如下所示。

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

我在安装过程中遗漏了什么吗?

我该怎么做才能解决这个问题?

谢谢!

最佳答案

报以上错误是因为Tensorboard是使用pip3(python 3)安装的,TF env设置为python2.7。

使用pip2安装tensorboard

现在 tensorboard 和 tf env 都设置为 python2

关于python - 通过 pip 安装后 Tensorboard 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44298801/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com