Add networkx to dependencies