ImportError:无法从'tensorflow'MacOS mojave导入名称'lookup_ops'

时间:2018-10-23 10:43:17

标签: python tensorflow pip chatbot

我正在尝试在我的MacOS Mojave(稳定)上基于chatbot program运行“ nmt

它利用了tensorflow,并且已经将其安装在我的系统(Version 0.12.0

在运行nmt的辅助模型模块时,出现以下错误

 Traceback (most recent call last):
  File "inference.py", line 9, in <module>
    from nmt import nmt
  File "/Users/illuminati/Desktop/nmt-chatbot/nmt/nmt/nmt.py", line 28, in <module>
    from . import inference
  File "/Users/illuminati/Desktop/nmt-chatbot/nmt/nmt/inference.py", line 24, in <module>
    from . import attention_model
  File "/Users/illuminati/Desktop/nmt-chatbot/nmt/nmt/attention_model.py", line 22, in <module>
    from . import model
  File "/Users/illuminati/Desktop/nmt-chatbot/nmt/nmt/model.py", line 27, in <module>
    from . import model_helper
  File "/Users/illuminati/Desktop/nmt-chatbot/nmt/nmt/model_helper.py", line 12, in <module>
    from tensorflow import lookup_ops
ImportError: cannot import name 'lookup_ops' from 'tensorflow' (/Users/illuminati/anaconda3/lib/python3.7/site-packages/tensorflow/__init__.py)

This is the NMT model_helper.py script供参考

  

我也尝试过重新安装tensorflow和protobuf,但这没有帮助

     

我的Python3版本是3.7.0

0 个答案:

没有答案