随手记

ancaconda Anaconda2-5.0.1-Windows-x86_64
(python3.5 ancaconda python-3.5.2-amd64 安装TensorFlow的时候自动依赖安装)
charmpython IDE

1 安装 ancaconda
访问Anaconda的下载页面,下载Python 3..6,选择64位版本。

2 配置国内的源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

  

3 继续在 Anaconda Prompt 窗口输入:
conda create -n tensorflow python=3.5

activate tensorflow   输入 激活环境

4 安装CPU版本的tensorflow

pip install --ignore-installed --upgrade https://mirrors.tuna.tsinghua.edu.cn/tensorflow/windows/cpu/tensorflow-1.2.1-cp35-cp35m-win_amd64.whl

你也可以打开 https://mirrors.tuna.tsinghua.edu.cn/tensorflow/ 选择合适的 whl 文件地址进行安装;或者打开https://mirrors.tuna.tsinghua.edu.cn/help/tensorflow/ 可视化选择 whl 版本。

GPU

【主要参考这篇 http://blog.csdn.net/jin739738709/article/details/73525482】

安装

pip install --ignore-installed --upgrade https://mirrors.tuna.tsinghua.edu.cn/tensorflow/windows/gpu/tensorflow_gpu-1.2.1-cp35-cp35m-win_amd64.whl

下载对应的

1. 下载CUDA8.0并安装

CUDA Toolkit 8.0 - Feb 2017

https://developer.nvidia.com/cuda-80-ga2-download-archive

[官网:https://developer.nvidia.com/rdp/cudnn-download]

2.   cuDNN v7.0.5

Download cuDNN v7.0.5 (Dec 5, 2017), for CUDA 8.0

https://developer.nvidia.com/rdp/cudnn-download

[官网:https://developer.nvidia.com/cuda-downloads]

打开你下载路径可以看到cuda文件夹下有三个子文件,分别为bin、include和lib

设置到环境变量比如:

E:\cudnn-8.0-windows7-x64-v7\cuda\bin;E:\cudnn-8.0-windows7-x64-v7\cuda\include;E:\cudnn-8.0-windows7-x64-v7\cuda\lib\x64;

WIN10下的版本对应是

CUDA Toolkit 8.0 - Feb 2017    配 cudnn-8.0-windows10-x64-v5.1 ,设定好环境变量后需要重启。

5. activate tensorflow
激活 TensorFlow 虚拟环境,当不使用 TensorFlow 时,使用 deactivate tensorflow 关闭。

6. 测试
进入到 Anaconda 安装目录下 /envs /tensorflow 文件夹,继续在 Anaconda Prompt 窗口输入输入:
python.exe
回车后,复制复制如下内容拷贝到Anaconda Prompt,自动输出:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
>>> sess.run(hello)
>>> a = tf.constant(10)
>>> b= tf.constant(32)
>>> sess.run(a+b)
>>>
输出:
...
b'Hello, TensorFlow!'
...
42

表示 TensorFlow 已经安装成功。
7.配置 charmpython
启动的时候指定python路径即可,比如我这边是这个路径。“进入到 Anaconda 安装目录下 /envs /tensorflow 文件夹”

其他

1.  W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.

因为预编译的问题,可百度看到。

补【升级版本】

出错处理

参考这里代码确认是否哪些DLL没有设定对

https://www.cnblogs.com/facingwaller/p/8614164.html


1. 使用 upgrade

  • CPU:pip3 install –upgrade tensorflow
  • GPU:pip3 install –upgrade tensorflow-gpu

2. 指定升级的版本(1.2.0)

  • CPU: pip install --ignore-installed --upgrade https://mirrors.tuna.tsinghua.edu.cn/tensorflow/windows/cpu/tensorflow-1.2.1-cp35-cp35m-win_amd64.whl
  • GPU:pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.2.0-cp35-cp35m-win_amd64.whl

由上所示,python 的版本需要为 3.5。

---

补充 安装jieba

执行Anaconda2.exe

输入

activate tensorflow

pip install jieba

3

安装插件

activate tensorflow_gpu_121

pip install gensim

pip install sklearn

pip install matplotlib

pip install pandas

安装WIN7/WIN10上的 CPU版本的TensorFlow的更多相关文章

  1. TensorFlow在Windows上的CPU版本和GPU版本的安装指南(亲测有效)

    安装说明 平台:Window.Ubuntu.Mac等操作系统 版本:支持GPU版本和CPU版本 安装方式:pip方式.Anaconda方式 attention: 在Windows上目前支持python ...

  2. 关于安装在win10上的oracle10g 兼容性问题

    首先在安装过程中会出现一次报错,在安装的时候 安装好了以后,准备敲击命令如果出现闪退,即是兼容性问题,下面继续设置兼容性问题 然后右键----属性----兼容性,勾上以兼容性运行即可

  3. Windows Installer服务总是自动关闭导致无法安装在win10上安装英伟达显卡驱动的解决方案

    你可以依次点击"开始→程序→附件→命令提示符",键入:msiexec /unregister, 然后再键入msiexec /regserver.应该就能解决. 更多的参考:How ...

  4. ubuntu16.04 虚拟机 安装win7/win10

    http://www.xitongcheng.com/jiaocheng/xtazjc_article_26588.html https://blog.csdn.net/sunyao_123/arti ...

  5. Win10下Anaconda3安装CPU版本TensorFlow并使用Pycharm开发

    环境:windows10 软件:Anaconda3 1.安装Anaconda 选择相应的Anaconda进行安装,下载地址点击这里,下载对应系统版本的Anaconda3. 运行 开始菜单->An ...

  6. Win10上安装Keras 和 TensorFlow(GPU版本)

    一. 安装环境 Windows 10 64bit  家庭版 GPU: GeForce GTX1070 Python: 3.5 CUDA: CUDA Toolkit 8.0 GA1 (Sept 2016 ...

  7. virtualbox谨记:win7上只有4.3.x的版本支持ubuntu14.04.3虚拟机安装Oracle Rac,其他的版本3.x和5.0.2(至2015-08-30)均不可以

    virtualbox谨记:win7上只有4.3.x的版本支持ubuntu14.04.3虚拟机安装Oracle Rac,其他的版本3.x和5.0.2(至2015-08-30)均不可以

  8. VS2015在win10上编译的程序在Win7上运行的方法

    在win10系统上使用vs2015编译了一个32位的应用程序.在win7上报错无法启动. 下面的win7系统上是可以运行的 无法运行的win7系统: 报错: 1.应用程序无法正常启动(0xc00000 ...

  9. ubuntu上安装win7系统(64位的)

    http://www.linuxidc.com/Linux/2012-11/74195.htm deb文件在ubuntu上直接用dpkg -i xxx.deb 如果虚拟机上只显示32位,则可能是cpu ...

随机推荐

  1. GPG

    一.什么是GPG 要了解什么是GPG,就要先了解PGP. 1991年,程序员Phil Zimmermann为了避开政府监视,开发了加密软件PGP.这个软件非常好用,迅速流传开来,成了许多程序员的必备工 ...

  2. 【交换机】交换机RLDP(环路检测&链路检测)功能介绍及配置说明

    功能简介RLDP 全称是Rapid Link Detection Protocol,是锐捷网络自主开发的一个用于快速检测以太网链路故障的链路协议.一般的以太网链路检测机制都只是利用物理连接的状态,通过 ...

  3. Linux零基础入门第五课

    文件的基本操作(下) 文件属性 file命令 语法 >$ file file0 [file1 file2 ...] file命令用于确认文件的类型. 在Linux下,通常并不会严格按照文件扩展名 ...

  4. 【nodejs】exports 和 module.exports 的区别

    require 用来加载代码,而 exports 和 module.exports 则用来导出代码.但很多新手可能会迷惑于 exports 和 module.exports 的区别,为了更好的理解 e ...

  5. 万能分布式消费框架,添加基于redis中间件的方式。

    框架目的是分布式调度起一切任何函数(当然也包括调度起一切任何方法). 之前写的是基于rabbitmq的,作为专用的消息队列好处比redis的list结构好很多.但有的人还是强烈喜欢用redis,以及r ...

  6. C# SQLite数据库

    在客户端配置文件<configuration>节点下,添加: <connectionStrings> <add name="localdb" conn ...

  7. monit官方摘录

    Here are the legal global keywords: Keyword Function ----------------------------------------------- ...

  8. JS备忘

    1. Promise用法 js异步调用较多,如果某个操作是基于上个异步结果才能执行的,再有一个操作又是基于此操作的,则需要嵌套多层代码,在ES6中引入了Promise写法,可以比较优雅的解决这个问题: ...

  9. CF 977E Cyclic Components

    E. Cyclic Components time limit per test 2 seconds memory limit per test 256 megabytes input standar ...

  10. 谢大神给的C++和C# DES加解密代码

    // CPPdesTest.cpp : 定义控制台应用程序的入口点.// #include "stdafx.h"//#include <windows.h>//#inc ...