gpt4 book ai didi

ubuntu - 在 ubuntu 中导入 tensorflow 时出错

转载 作者:行者123 更新时间:2023-12-04 19:15:18 25 4
gpt4 key购买 nike

我有 ubuntu 14.04 ;但是当我运行 import tensorflow 时出现此错误:

如果我要导入 tensorflow

>>> import tensorflow

.
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import

是什么问题以及如何解决这个问题?

最佳答案

您需要将您的 numpy 版本更新为 10(您当前的版本是 9)。

关于ubuntu - 在 ubuntu 中导入 tensorflow 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40456416/

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