如何修复“RuntimeWarning:CompileTimeVersion3.6 of module”tensorflow.python.framework.fast_tensor_util'与运行时版本3.7“”不匹配?

2024-04-26 17:37:40 发布

您现在位置:Python中文网/ 问答频道 /正文

MacKeros导入失败,错误为:

RuntimeWarning: compiletime version 3.6 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.7

Tags: ofversiontensorflowmatch错误utilnotframework
2条回答

我也有同样的问题。在

我通过更新tensorflow解决了我的问题:

conda update tensorflow

希望这能对你有所帮助!在

我正在基于this tutorial on machinelearningmastery设置我的环境(macosx10.14.4),当我第一次运行deep时_版本.py(打印了theano、tensorflow和keras的版本)我得到了与OP描述的相同的运行时警告。它看起来像是我运行时安装的版本:

$ conda install theano
...
$ conda install -c conda-forge tensorflow

安装了一个使用python3.6编译的tensorflow版本。我发现this GitHub issue comment from August 2018声称他们(当时)还没有python3.7的原生二进制文件。在

基于AKAWei's answer in this question我运行了:

^{pr2}$

这消除了运行时警告。在

相关问题 更多 >