The code I am trying to run is
import graph_nets as gn
and the compiler returns
ImportError: cannot import name 'Sonnet' from 'graphs'
which traces back to a line in the sonnet package that says from graphs import Sonnet, D3Graph, MatplotGraph
(I have seen many similar errors on forums and the common solution is
pip uninstall sonnet
pip install dm-sonnet
but this doesn't work for me as pip install dm-sonnet is responded with requirement already satisfied and uninstalling sonnet makes the compiler return
module 'sonnet' has no attribute '__version__'
for the same line of code I am trying to run) The there other possible solutions?
AFAIU the correct package you need is
dm-sonnet. But you have already installedsonnet. Now you need to reinstalldm-sonnetto remove remnants ofsonnetand installdm-sonnetafresh.Or simply
To use
dm-sonnetyou needtensorflow.dm-sonnetdoesn't automatically installtensorflowas a dependency so you need to install it yourself: