{"id":24114,"library":"networkit","title":"NetworKit","description":"NetworKit is an open-source toolbox for high-performance network analysis. It provides efficient implementations of graph algorithms for large networks, with a focus on scalability and performance. Current version 11.2.1, released irregularly.","status":"active","version":"11.2.1","language":"python","source_language":"en","source_url":"https://github.com/networkit/networkit","tags":["network analysis","graph algorithms","high-performance"],"install":[{"cmd":"pip install networkit","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The module name is all lowercase 'networkit'.","wrong":"import NetworKit","symbol":"networkit","correct":"import networkit as nk"},{"note":"graph is a submodule, not a top-level attribute.","wrong":"import networkit.graph","symbol":"graph","correct":"from networkit import graph"}],"quickstart":{"code":"import networkit as nk\n\n# Create a graph\nG = nk.Graph(5)\nG.addEdge(0, 1)\nG.addEdge(1, 2)\nG.addEdge(2, 3)\nG.addEdge(3, 4)\n\n# Run BFS\nbfs = nk.distance.BFS(G, 0)\nbfs.run()\nprint(bfs.distances())","lang":"python","description":"Basic usage: create a graph, add edges, run a BFS."},"warnings":[{"fix":"Use 'from networkit import <submodule>' instead of 'import networkit.<submodule>'.","message":"In version 10.0, the module structure was reorganized. Submodules like 'graph' and 'distance' must be imported explicitly (e.g., 'from networkit import graph') instead of 'import networkit.graph'.","severity":"breaking","affected_versions":">=10.0"},{"fix":"Ensure Python version >=3.10.","message":"Starting with version 9.0, Python 3.6 and 3.7 are no longer supported. Requires Python >=3.8 (now >=3.10 as of 11.0).","severity":"breaking","affected_versions":">=9.0"},{"fix":"Use 'import networkit as nk' and 'nk.Graph'.","message":"The old 'NetworKit' C++ naming is deprecated in Python. Do not use 'from NetworKit import Graph'.","severity":"deprecated","affected_versions":"all"},{"fix":"Specify directed=True when creating a directed graph.","message":"Graph edges are directed by default? Actually, Graph is undirected by default. Use Graph(0, directed=True) for directed graphs.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install networkit'. Ensure you are using the correct Python environment.","cause":"NetworKit not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'networkit'"},{"fix":"Use 'from networkit import graph' or 'import networkit.graph' (though the latter may still fail in some versions). Preferred: 'from networkit import graph'.","cause":"Trying to access submodule directly without importing it.","error":"AttributeError: module 'networkit' has no attribute 'graph'"},{"fix":"Use 'from networkit.distance import BFS'.","cause":"BFS is not a top-level attribute; it's in the 'distance' submodule.","error":"ImportError: cannot import name 'BFS' from 'networkit'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}