conda install networkx

C++
conda install -c anaconda networkx
Source

Also in C++: