我目前正在与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