1. 确保成功安装了tensorflow

2. 查看当前tensorflow下的库文件,判断是否已经安装了h5py,scipy:conda list

3. 若没有安装,安装h5py,scipy。我的电脑中没有安装h5py,安装:pip install h5py
安装scipy同理

4. 安装tflearn
有两种安装方式
1)pip install tflearn
2) pip install git+https://github.com/tflearn/tflearn.git (要确保先安装了Git)
我使用的第一种安装方法

5. 至此tflearn安装成功。

6. 从tflearn官网找的一个例子:http://tflearn.org/examples/

from __future__ import absolute_import, division, print_function

import tflearn

# Regression data
X = [3.3,4.4,5.5,6.71,6.93,4.168,9.779,6.182,7.59,2.167,7.042,10.791,5.313,7.997,5.654,9.27,3.1]
Y = [1.7,2.76,2.09,3.19,1.694,1.573,3.366,2.596,2.53,1.221,2.827,3.465,1.65,2.904,2.42,2.94,1.3] # Linear Regression graph
input_ = tflearn.input_data(shape=[None])
linear = tflearn.single_unit(input_)
regression = tflearn.regression(linear, optimizer='sgd', loss='mean_square',
metric='R2', learning_rate=0.01)
m = tflearn.DNN(regression)
m.fit(X, Y, n_epoch=1000, show_metric=True, snapshot_epoch=False) print("\nRegression result:")
print("Y = " + str(m.get_weights(linear.W)) +
"*X + " + str(m.get_weights(linear.b))) print("\nTest prediction for x = 3.2, 3.3, 3.4:")
print(m.predict([3.2, 3.3, 3.4]))

运行结果部分截图如下:

--------------------------------分割线--------------------------------------------
安装过程中遇到的错误


1. hdf5 is not supported on this machine (please install/reinstall h5py for optimal experience)
原因:没有安装h5py,安装h5py后,问题得以解决

2. curses is not supported on this machine (please install/reinstall curses for an optimal experience)
解决方法:安装curses
安装过程:
1)如果没有安装wheel,首先通过pip命令安装wheel:pip install wheel

2)从https://www.lfd.uci.edu/~gohlke/pythonlibs/下载curses‑2.2‑cp35‑none‑win_amd64.whl包

3)cd到下载的.whl的目录(如我的 ~/PythonTool)。直接输入命令 : pip install curses-2.2-cp36-cp36m-win32.whl

参考:https://github.com/lxzheng/machine_learning/wiki/TensorFlow--%E5%92%8C-TFlearn-Windows%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97

Window系统 安装TFLearn的更多相关文章

  1. 在window系统下安装Sass

    1.Ruby下载 因为Sass依赖于Ruby环境,所以应先在window系统下安装Ruby,Ruby安装包下载链接:http://rubyinstaller.org/downloads/ 2.Ruby ...

  2. U盘安装window系统

    U盘安装window系统: 1. 制作系统启动U盘,推荐使用老毛桃. 2. 电脑上插入U盘,启动系统,选择U盘启动. 3. 进入老毛桃选择界面,选择生成PE系统.推荐win8,之前在一个戴尔电脑上使用 ...

  3. kvm安装window系统及使用NFS动态迁移

    验证是否开启虚拟化 # grep -E 'svm|vmx' /proc/cpuinfo - vmx is for Intel processors - svm is for AMD processor ...

  4. mysql 学习之1 mysql在window系统下的安装

    转载: https://blog.csdn.net/weixin_43295278/article/details/8287440 此方法只 适用 于window系统 坑 此篇文章在使用 alter ...

  5. MariaDB ZIP方式安装(Window系统)

    Maria DB ZIP方式安装 Windows上ZIP包的入门非常简单-此发行版包括预构建的数据库文件,这些文件可以在解压缩ZIP后立即使用. 您可以从命令提示符运行mysqld.exe,如下所示: ...

  6. window下安装pip工具,再利用pip安装工具来安装其他的python包

    1.在安装pip前,请确认你window系统中已经安装好了python,和easy_install工具,如果系统安装成功,easy_install在目录C:\Python27\Scripts 下面,如 ...

  7. [实战经验]Macbook pro 苹果系统换window系统

    1.       Macbook的window软件驱动备份 通过Boot Camp助手进行window支持苹果驱动下载 2.       拆机把SSD固态硬盘放在主盘位置,把苹果的机械盘放在光驱位置 ...

  8. 【原】window上安装elasticserach

    [window上安装elasticserach] 系统环境:2008R2 x64测试安装用的服务器IP:192.168.12.52elasticsearch版本:2.3.4JDK版本:jdk 1.8. ...

  9. 学习window系统下的注册表

    一直不明白注册表是一个什么鬼,查了资料后大概明白了注册表到底有什么用,其实简单来说注册表就是一个存放系统.硬件.应用配置信息的数据ku.##### 一.注册表的来历在最早的视窗操作系统win3.x中, ...

随机推荐

  1. MapReduce 基础学习

      什么是MapReduce? mapreduce 是一种软件框架 mapreduce job将任务分解为独立的块儿到不同的map task,进行并行处理: map任务输出会做相应的排序处理,并作为r ...

  2. C语言学习之路之基础变量

    Hello,大家好,今天又和大家见面了!前两天,我看到了几款游戏引擎渲染效果的对比的视频,https://www.bilibili.com/video/av5113296?from=search&am ...

  3. spring boot 配置全局日期类型转换器

    1. 首先自定义一个类型转换器 import org.springframework.core.convert.converter.Converter; import org.springframew ...

  4. maven项目的标准目录结构

    maven项目的标准目录结构如下:

  5. 高可用OpenStack(Queen版)集群-17.一些问题

    参考文档: Install-guide:https://docs.openstack.org/install-guide/ OpenStack High Availability Guide:http ...

  6. spring boot+mybatis+swagger搭建

    环境概述 使用的开发工具:idea 2018 3.4 环境:jdk1.8 数据库:MariaDB (10.2.21) 包管理:Maven 3.5 Web容器:Tomcat 8.0 开发机系统:Wind ...

  7. mongoose和mongodb的几篇文章 (ObjectId,ref)

    http://mongoosejs.com/docs/populate.html http://stackoverflow.com/questions/6578178/node-js-mongoose ...

  8. maven学习资料(三)

    两个项目聚合到一个项目中: .

  9. C++ 函数 参数传递方式

    用函数调用所给出的实参(实际参数,actual arguments)向函数定义给出的形参(形式参数,formal arguments)设置初始值的过程,叫做参数传递(Argument Passing) ...

  10. Scrum立会报告+燃尽图(Final阶段第三次)

    此作业要求参见:https://edu.cnblogs.com/campus/nenu/2018fall/homework/2481 项目地址:https://coding.net/u/wuyy694 ...