AttributeError: module 'tensorflow' has no attribute 'keras' in conda prompt

后端 未结 2 1977
孤独总比滥情好
孤独总比滥情好 2021-01-28 17:59

*I try to install tensorflow and keras

I installed tensorflow and I imported it with no errors

Keras is installed but I can\'t import it *

(base)         


        
相关标签:
2条回答
  • 2021-01-28 18:33

    don't forget to make an env for using tensorflow. it needs it's own enviroment. when i used conda i had some trouble trying to use tf and it was mainly because i didn't set it up in the right way.

    https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands

    0 讨论(0)
  • 2021-01-28 18:39

    Thanks for all answers But I solve it I follow this tutorial with CUDA 10.1 https://towardsdatascience.com/installing-tensorflow-with-cuda-cudnn-and-gpu-support-on-windows-10-60693e46e781 .After this tutorial I uninstall this Libs and install it againpip install keras, pip install --upgrade setuptools, pip install cmake, pip install keras-models, pip install keras-applications, pip install keras-preprocessing and download Visual studio 2015. Then Run Code from my quesion like from keras.models import Sequential and check pathon path.

    0 讨论(0)
提交回复
热议问题