首页 > 编程语言 > 详细

关于MacOs python 安装tensorflow1.8版本时出现的问题及解决

时间:2019-10-19 14:37:24      阅读:91      评论:0      收藏:0      [点我收藏+]
import tensorflow as tf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/zhangxing/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/Users/zhangxing/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/Users/zhangxing/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/Users/zhangxing/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 114
    def TFE_ContextOptionsSetAsync(arg1, async):

在安装完tensorflow1.8版本后调用穿线该错误

解决方法:找到/Users/zhangxing/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py 文件,将定义函数时的参数async改为其他非关键字即可!

亲测有效!

关于MacOs python 安装tensorflow1.8版本时出现的问题及解决

原文:https://www.cnblogs.com/zxingwork/p/11703601.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!