주피터 노트북에서 import keras를 하면 오류가 뜹니다. keras와 tensorflow 모두 pip install을 이용해서 다운 받았고 tensorflow 버전은 2.3.1이고 keras는 2.4.3입니다.
<오류 코드>
ImportError Traceback (most recent call last)
~\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in
63 try:
---> 64 from tensorflow.python._pywrap_tensorflow_internal import *
65 # This try catch logic is because there is no bazel equivalent for py_extension.
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 지정된 모듈을 찾을 수 없습니다.
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
~\anaconda3\lib\site-packages\keras_init_.py in
2 try:
----> 3 from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
4 except ImportError:
~\anaconda3\lib\site-packages\tensorflow_init_.py in
40
---> 41 from tensorflow.python.tools import module_util as _module_util
42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
~\anaconda3\lib\site-packages\tensorflow\python_init_.py in
39
---> 40 from tensorflow.python.eager import context
41
~\anaconda3\lib\site-packages\tensorflow\python\eager\context.py in
34 from tensorflow.core.protobuf import rewriter_config_pb2
---> 35 from tensorflow.python import pywrap_tfe
36 from tensorflow.python import tf2
~\anaconda3\lib\site-packages\tensorflow\python\pywrap_tfe.py in
27 # pylint: disable=invalid-import-order,g-bad-import-order, wildcard-import, unused-import
---> 28 from tensorflow.python import pywrap_tensorflow
29 from tensorflow.python._pywrap_tfe import *
~\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in
82 above this error message when asking for help.""" % traceback.format_exc()
---> 83 raise ImportError(msg)
84
ImportError: Traceback (most recent call last):
File "C:\Users\kimdo\anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 지정된 모듈을 찾을 수 없습니다.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
in
----> 1 import keras
~\anaconda3\lib\site-packages\keras_init_.py in
3 from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
4 except ImportError:
----> 5 raise ImportError(
6 'Keras requires TensorFlow 2.2 or higher. '
7 'Install TensorFlow via pip install tensorflow
')
ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via pip install tensorflow