keras安装

上一讲,我们搭建了tensorflow的环境,可以供大家参考:点击打开链接

在keras安装之前必须先进行theano安装,同上一讲所讲,我们还可以使用阿里的theano,输入命令:

pip install theano -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

然后进入python环境,测试theano是否安装完成:

(anaconda3) D:\Anaconda2\envs\Anaconda3>python
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import theano
WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
D:\Anaconda2\envs\Anaconda3\lib\site-packages\theano\configdefaults.py:560: UserWarning: DeprecationWarning: there is no c++ compiler.This is deprecated and with Theano 0.11 a c++ compiler will be mandatory
  warnings.warn("DeprecationWarning: there is no c++ compiler."
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
>>> quit()

接下来我们进行keras的安装,因为一共只有300+KB,所以我们直接用命令:

pip install keras

同理,在python下测试:

(anaconda3) D:\Anaconda2\envs\Anaconda3>python
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
Using TensorFlow backend.
>>> quit()
说明你已经成功完成!

你可能感兴趣的:(机器学习,keras,theano,windows,win10)