如何修复“使用tensorflow后端” Keras导入错误?

时间:2019-04-22 08:32:28

标签: python keras jupyter-notebook

我目前正在与Keras一起开始深度学习。在Jupyter Notebook上创建新的Python文件后,我导入Keras,只是发现了出现的错误。仅在导入Keras时发生错误(据我所知),而在导入其他库(如numpy和pandas)时则没有错误。请帮助我解决此问题。

我曾尝试使用Stack Overflow上其他答案中的一些代码来更新tensorflow,更新keras,但均未成功。我目前正在尝试“ conda install -c conda-forge tensorflow = 1.12.0”,但是要花很多时间才能运行。

from keras.models import Sequential
from keras.layers import Dense
import numpy
Using TensorFlow backend.
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
ImportError: numpy.core.multiarray failed to import

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
ImportError: numpy.core.umath failed to import

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
ImportError: numpy.core.umath failed to import

0 个答案:

没有答案
相关问题