python - 如何安装最新版本的 tensorflow?
问题描述
我想在我的机器上安装最新版本的 tensorflow (1.12.0) 并使用pip install tensorflow
. 1.12.0 版本的 tensorflow 安装在我的 linux 机器上,没有任何错误,但是当我尝试在我的 python shell 中导入 tensorflow 时,它给出了这个错误并中止了 tensorflow 导入。
>>> import tensorflow as tf
F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.
Aborted
在这个答案中,据说它是一个简单的警告,但我的不是警告,它完全中止了 tensorflow 的导入。我尝试多次卸载并重新安装 tensorflow,但同样的问题仍然存在。然后我尝试安装最低版本的 tensorflowpip install tensorflow==1.0.0
并且能够安装旧版本的 tensorflow。
如何安装最新版本的 tensorflow?
解决方案
看来您的 CPU 不支持 AVX 指令。
由于 1.6 版使用 AVX 指令,因此 TF 不能在“旧”CPU 上使用。
但是有一些非官方的。但是你可能不会发现基于最新版本的 tensorflow。
这是一个关于它的线程:https ://github.com/tensorflow/tensorflow/issues/18689
推荐阅读
- node.js - 无法使用 git repo 在 heroku 上启用自动部署
- ios - 如何每 24 小时获得一个新按钮以及
- reactjs - gatsby 无法获取所有关于 vercel 生产的 graphql 数据
- angular - 动态更改 socketio 配置
- android - 无法使用 Android SAF 从子目录创建和列出文件 - ACTION_OPEN_DOCUMENT_TREE
- flutter - 如何在颤动中剪辑定位小部件的角
- mysql - 用于排除 2 分钟内会话的 SQL 查询
- c++ - 如何找到 map.at 坠毁的位置?
- java - 如何修复 ODI12c 列表软件上的 java.lang.noclassdeffounderror javax/xml/bind/jaxbexception - Oracle DB19c - ODI 12c - JDK 11.0.11
- kubernetes - 使用主机的入口规则