sonnet import fails on: 'from graphs import Sonnet'

3.4k views Asked by At

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

1

There are 1 answers

0
calvrix On

Try this.

pip uninstall sonnet;
pip install dm-sonnet