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. bzoj P5016[Snoi2017]一个简单的询问——solution

    Description 给你一个长度为N的序列ai,1≤i≤N和q组询问,每组询问读入l1,r1,l2,r2,需输出   get(l,r,x)表示计算区间[l,r]中,数字x出现了多少次. Input ...

  2. drupal7获取当前theme的路径

    //方式一 $theme_path=drupal_get_path('theme', $theme); //方式二 $theme_path=path_to_theme();

  3. Flutter之搜索电影

    搜索使用的是豆瓣电影API https://developers.douban.com/wiki/?title=movie_v2#subject 效果 代码: https://github.com/z ...

  4. 'adb remount'的作用是什么?在什么情况下有用?

    'adb remount' 将 '/system' 部分置于可写入的模式,默认情况下 '/system' 部分是只读模式的.这个命令只适用于已被 root 的设备. 在将文件 push 到 '/sys ...

  5. 【Python】多线程

    import threading import time class myThread (threading.Thread): #继承父类threading.Thread def __init__(s ...

  6. AWS CSAA -- 04 AWS Object Storage and CDN - S3 Glacier and CloudFront(二)

    015 Version Control - Lab 016 Cross Region Replication 017 Lifecycle Management  Glacier - Lab 018 C ...

  7. 用烂点子打破沉默的"麦当劳理论"

    "麦当劳"理论是啥? 讨论周末聚餐去哪儿的时候,朋友们往往太过顾及彼此的想法,犹豫着等待其他人做决定. 当谁也不愿说出提议的时候, 我往往会耍一个花招:推荐去麦当劳吃. 宝贵的休息 ...

  8. 单元测试,模拟用户Get登陆,并携带登录后的token访问接口

    HttpClient _httpClient; HttpClient _businessHttpClient; private async Task<string> GetAccessTo ...

  9. Oracle EBS INV 创建货位

    create or replace PROCEDURE XX_CREATE_LOCATOR AS -- Common Declarations l_api_version NUMBER := 1.0; ...

  10. Visual Basic 6.0(VB6.0)详细安装过程

    注:大家如果没有VB6.0的安装文件,可自行百度一下下载,一般文件大小在200M左右的均为完整版的软件,可以使用. 特别提示:安装此软件的时候最好退出360杀毒软件(包括360安全卫士,电脑管家等,如 ...