6

Trying to run some github code which imports 'sonnet' which seems to import other packages from 'graphs'. I get:

----> 9 import sonnet as snt

~\Anaconda3\lib\site-packages\sonnet\__init__.py in <module>()
      1 __version__ = '0.1.6'
----> 2 from graphs import Sonnet, D3Graph, MatplotGraph

ImportError: cannot import name 'Sonnet'

I've explicitly installed and imported 'graphs', but failed with the same error when explicitly tried to:

    ----> 1 from graphs import Sonnet

ImportError: cannot import name 'Sonnet'

Any advice?

Environment: Jupyter Notebook, python 3.6.5, Anaconda, windows

Sergei Lebedev
  • 2,659
  • 20
  • 23
Ganitph
  • 113
  • 1
  • 6

1 Answers1

8

Try this.

pip uninstall sonnet;
pip install dm-sonnet
TheLethalCoder
  • 6,668
  • 6
  • 34
  • 69
calvrix
  • 81
  • 2