deep-atrous-ner icon indicating copy to clipboard operation
deep-atrous-ner copied to clipboard

absolute_import doesn't work

Open Surojit88 opened this issue 7 years ago • 2 comments

      1 from __future__ import absolute_import
      2 from tensorflow import *
      3 
      4 from .sg_util import sg_opt
      5 from .sg_main import *

AttributeError: module 'tensorflow' has no attribute 'absolute_import'`

This happens when I try to import sugartensor. Am using TF version 1.5. Can someone please help?

Surojit88 avatar Oct 27 '18 07:10 Surojit88

In which file are you receiving the error? Did you use the requirements file to install all dependencies?

randomrandom avatar Nov 08 '18 22:11 randomrandom

1.- pip uninstall sugartensor 2.- you have to download the zip file from sugartensor repo (https://github.com/buriburisuri/sugartensor) 3.- unzip "sugartensor-master.zip" and modify the \sugartensor-master.zip\sugartensor-master\sugartensor_init_.py 3.1.- by comenting the line: from tensorflow import
3.2.- writing the line: from tensorflow.python import 3.3.- zip the file again 4.- pip install "sugartensor-master.zip"

ghost avatar Jan 11 '19 20:01 ghost