Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

absolute_import doesn't work #4

Open
Surojit88 opened this issue Oct 27, 2018 · 2 comments
Open

absolute_import doesn't work #4

Surojit88 opened this issue Oct 27, 2018 · 2 comments

Comments

@Surojit88
Copy link

      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?

@randomrandom
Copy link
Owner

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

@ghost
Copy link

ghost commented Jan 11, 2019

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants