【发布时间】:2018-05-26 12:56:44
【问题描述】:
在Mac osX 10.13.2上运行,安装了tensorflow的cpu版本
我安装了 tensorflow v1.4 并且收到了这个不匹配警告。幸运的是它执行但我不知道如何获得与 Python 3.6 匹配的 tensorflow ??
我进行了测试以验证我的安装,这也有点奇怪。打印命令看起来并没有真正执行。有b'...' (见下文)
关于我的 cpu 支持 tensorflow 二进制不支持的指令的一些说明。
我是新手,谢谢..
在 MacBook 的终端窗口中测试 tensorflow:
Last login: Tue Dec 12 11:36:14 on ttys000
fredericks-MBP:~ bravo$ python
Python 3.6.2 |Anaconda custom (64-bit)| (default, Sep 21 2017, 18:29:43)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import tensorflow as tf
/anaconda3/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
========================== 验证安装:
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2017-12-12 11:48:30.408157: 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 AVX
>>>
>>> print(sess.run(hello))
b'Hello, TensorFlow!'
>>>
【问题讨论】:
标签: python macos python-3.x tensorflow anaconda