Pyhton3.6.5 安装Keras之旅-成功

首先要先安装好tensorflow,安装过程:https://blog.csdn.net/weixin_52500860/article/details/115839580

  1. 打开Anaconda prompt
    在这里插入图片描述
    没有anaconda也需要提前安装哦!
  2. 激活tensorflow
    命令:activate tensorflow
    在这里插入图片描述
  3. conda install mingw libpython
    在这里插入图片描述
    pip install theano
    在这里插入图片描述
  4. 上面步骤完成之后不要直接:pip install keras,即使安装成功也会出现错误:在这里插入图片描述把keras降到2.2,依然错误:
    在这里插入图片描述版本不匹配

成功示范:
pip install keras==2.3.1 -i https://pypi.douban.com/simple在这里插入图片描述
安装成功:
在这里插入图片描述

  1. 验证是否有效
    命令:python
    import keras
    在这里插入图片描述
    错误解决:
    1.安装keras,tensorflow时出现的错误:
    ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
    tensorflow 2.0.0 requires keras-applications>=1.0.8, but you have keras-applications 1.0.2 which is incompatible.
    tensorflow 2.0.0 requires keras-preprocessing>=1.0.5, but you have keras-preprocessing 1.0.1 which is incompatible

在这里插入图片描述
解决方案:示例:
在这里插入图片描述
pip install keras-applications
单独下载即可

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐