AttributeError: module ‘networkx’ has no attribute “connected_component_subgraphs”

networkx library has deprecated connected_component_subgraphs.

you might be trying to get the connected component subgraphs, But you are getting the above error.

Actually, networkx has deprecated this method and suggested another way to solve the above problem.

Solution:

I hope it will help you. please upvote.

Thanks!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Muhammad Iqbal bazmi

A self-taught programmer, Data Scientist and Machine Learning Engineer