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

    亲测有效!

  • 相关阅读:
    jinja模板语法
    flask处理cookie
    django模板语法
    django模型操作
    世间有一种坏
    单纯指望运动减肥的是几乎不可能的?
    主题
    slax自启动程序
    搞定TADA68机械键盘的固件修改
    ubuntu中编译安装gcc 9.2.0
  • 原文地址:https://www.cnblogs.com/zxingwork/p/11703601.html
Copyright © 2011-2022 走看看