CentOS7+ anaconda3 + Python-3.6 + tensorflow-cpu-1.5安装和配置
=============================================================================
本博客,博文:CentOS7服务器上部署深度/机器学习环境推荐首选anaconda3 链接https://www.cnblogs.com/jeshy/p/10522379.html
可能会出错:
>>> import tensorflow as tf
Illegal instruction
本文主要解决此问题(降低版本)
=============================================================================
(base) [jiangshan@localhost ~]$ conda info -e
# conda environments:
#
base * /home/jiangshan/anaconda3
tensorflow /home/jiangshan/anaconda3/envs/tensorflow

==========先卸载和删除掉先前创建 的tensorflow虚拟环境=======================

(base) [jiangshan@localhost ~]$ conda remove --name tensorflow --all

==========先卸载和删除掉先前创建 的tensorflow虚拟环境=======================

(base) [jiangshan@localhost ~]$ conda info -e
# conda environments:
#
base * /home/jiangshan/anaconda3

(base) [jiangshan@localhost ~]$ conda create --name tensorflow python=3.6
(base) [jiangshan@localhost ~]$ conda activate tensorflow

添加设置镜像
# 添加tensorflow的Linux/cpu清华镜像
(tensorflow) [jiangshan@localhost ~]$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/
# 设置搜索时显示通道地址
(tensorflow) [jiangshan@localhost ~]$ conda config --set show_channel_urls yes
**************************************************************************
安装 tensorflow1.8.0
(tensorflow) [jiangshan@localhost ~]$ conda install tensorflow==1.8
以上会出错,改为以下用pip从源码安装
(tensorflow) [jiangshan@localhost ~]$ pip install tensorflow==1.8
测试==报错==
Python 3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Illegal instruction
补救 卸载 tensorflow1.8 改安装较低版本的tensorflow(我来来回回降到了1.5版)
(tensorflow) [jiangshan@localhost ~]$ pip uninstall tensorflow
**************************************************************************
安装 tensorflow1.5
(tensorflow) [jiangshan@localhost ~]$ pip install tensorflow==1.5
测试
(tensorflow) [jiangshan@localhost ~]$ python
Python 3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('你好!姜山~')
>>> sess = tf.Session()
2019-03-13 03:39:49.959697: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2
>>> print (sess.run(hello))
b'\xe4\xbd\xa0\xe5\xa5\xbd\xef\xbc\x81\xe5\xa7\x9c\xe5\xb1\xb1~'【我靠 不识别中文?????,赶紧换英文试试】

>>> hello = tf.constant('hhhh')
>>> sess = tf.Session()
>>> print (sess.run(hello))
b'hhhh'

>>> quit()
(tensorflow) [jiangshan@localhost ~]$ conda deactivate
(base) [jiangshan@localhost ~]$

成功

CentOS7+ anaconda3 + Python-3.6 + tensorflow-cpu-1.5安装和配置的更多相关文章

  1. Python黑帽编程1.1虚拟机安装和配置 Kali Linux 2016

    Python黑帽编程1.1虚拟机安装和配置 Kali Linux 2016 0.1  本系列教程说明 本系列教程,采用的大纲母本为<Understanding Network Hacks Att ...

  2. Nginx+Python+uwsgi+Django的web开发环境安装及配置

    Nginx+Python+uwsgi+Django的web开发环境安装及配置 nginx安装 nginx的安装这里就略过了... python安装 通常系统已经自带了,这里也略过 uwsgi安装 官网 ...

  3. Windows中Anaconda,Tensorflow 和 Pycharm的安装和配置

    Anaconda完全入门指南 https://www.jianshu.com/p/eaee1fadc1e9                 [安装不要按此条链接进行] Windows中 Anacond ...

  4. Python入门:Anaconda和Pycharm的安装和配置

    Python入门:Anaconda和Pycharm的安装和配置  转自:https://www.cnblogs.com/yuxuefeng/articles/9235431.html 子曰:“工欲善其 ...

  5. mysql 5.7.29 在centos7.6下超简单的本地yum源安装与配置

    目录 生成yum源元数据 从网易镜像站下载MySQL 5.7 的 bundle包 创建文件 mysql-local.repo 执行yum install命令 生成yum源元数据 createrepo ...

  6. 【转】Python入门:Anaconda和Pycharm的安装和配置

    子曰:“工欲善其事,必先利其器.”学习Python就需要有编译Python程序的软件,一般情况下,我们选择在Python官网下载对应版本的Python然后用记事本编写,再在终端进行编译运行即可,但是对 ...

  7. Anaconda多版本Python管理以及TensorFlow版本的选择安装

    Anaconda是一个集成python及包管理的软件,记得最早使用时在2014年,那时候网上还没有什么资料,需要同时使用py2和py3的时候,当时的做法是同时安装Anaconda2和Anaconda3 ...

  8. python在windows和linux下的安装和配置

    一.windows下安装python3.6 安装编辑器:Ecplise+pydev插件 Eclipse是写JAVA的IDE, 这样就可以通用了,学习代价小.  学会了Eclipse, 以后写Pytho ...

  9. 【Python①】python简介,安装以及配置

    今天开始学习python,将一些心得和知识点记录下来,如有疏漏或表达问题,欢迎指正.后面所有代码均为Python 3.3.2版本(运行环境:Windows7)编写. 附:2014年8月TIOBE编程语 ...

  10. centos7 源码编译安装TensorFlow CPU 版本

    一.前言 我们都知道,普通使用pip安装的TensorFlow是万金油版本,当你运行的时候,会提示你不是当前电脑中最优的版本,特别是CPU版本,没有使用指令集优化会让TensorFlow用起来更慢. ...

随机推荐

  1. 【 js 基础 】【 源码学习 】backbone 源码阅读(三)

    最近看完了 backbone.js 的源码,这里对于源码的细节就不再赘述了,大家可以 star 我的源码阅读项目(https://github.com/JiayiLi/source-code-stud ...

  2. jQuery操作table数据上移、下移和置顶

    jQuery 操作table中的tr换行的步骤如下: 1.获取当前tr var $tr = $(this).parents("tr"); 2.移动tr //上移 $tr.prev( ...

  3. 绑定Oracle Database 到 ActiveReport

    ActiveReport 可以和多种数据源交互,包括OLEDB, SQL, XML和集合对象. 在本文中我们将阐述如何绑定Oracle 数据库到 ActiveReport . 这是一件很轻松的事情.下 ...

  4. .NET 获取类内成员的名称,以字符串形式显示

    需要做一个功能,显示类内的属性名和对应的值.比如有类 Public Class SupervisedParams     Public TestMode As string     Public Ti ...

  5. [Swift] Swift笔记

    开始整理Swift笔记了.打算直接用Playground去写,里面自带的Markup语法和Markdown差不多,显示的效果也不差于博客.而且用Xcode看代码也方便.所以这部分内容不再在博客里记录了 ...

  6. tomcat报错this web application instance has been stopped already问题

    上网搜了下,大部分的报错原因:重启时候 之前的tomcat未正常关闭 ,导致在重启时候 报了这个问题.mac下解决: ps -ef|grep tomcat 找到在进行的tomcat ,kill -9  ...

  7. LeetCode题解之Rotated Digits

    1.题目描述 2.代码 int rotatedDigits(int N) { ; ; i <= N; i++) { if (isGood(i)) { res++; } } return res; ...

  8. LeetCode题解之 Continuous Subarray Sum

    1.题目描述 2.循环计算即可 3.代码 bool checkSubarraySum(vector<int>& nums, int k) { ){ return false ; } ...

  9. pycharm结合coding.net使用

    1,网上很多都是讲解pycharm结合github的,将pycharm的项目推送到github上. 现在很多博客都写了pycharm和github结合,其次,github同步时较慢,时而导致同步失败, ...

  10. tomcat catalina.out日志切割(logrotate)

    简单说明: 1,因为tomcat日志会一直往catalina.out里面输出,所以回到值catalina.out非常大,占用磁盘空间 2,日志非常大,查看日志就需要很长时间. 3,据说catalina ...