zoukankan      html  css  js  c++  java
  • 关于MacOs python 安装tensorflow1.8版本时出现的问题及解决

    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改为其他非关键字即可!

    亲测有效!

  • 相关阅读:
    Map
    Collection接口之Set
    Collection接口之List、泛型
    简介
    递归
    File类
    转换流InputStreamReader、OutputStreamWriter
    springmvc
    集合
    SpringCloud学习笔记
  • 原文地址:https://www.cnblogs.com/zxingwork/p/11703601.html
Copyright © 2011-2022 走看看