简体   繁体   中英

is there a way to solve importing ternsorflow for keras problem?

Traceback (most recent call last):
  File "C:\Users\surik\anaconda3\envs\issa\lib\site-packages\keras\__init__.py", line 3, in <module>
    from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
ModuleNotFoundError: No module named 'tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 16, in <module>
    from keras.models import Sequential
  File "C:\Users\surik\anaconda3\envs\issa\lib\site-packages\keras\__init__.py", line 6, in <module>
    'Keras requires TensorFlow 2.2 or higher. '
ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via `pip install tensorflow`

the tensorflow version i was using was 2.2.2 and keras version using was 2.4.3 and the python versionis 3.7.0

尝试将 TensorFlow 直接 pip 安装到您的 anaconda 环境中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM