Open your terminal using ALT+CTRL+T and then type the following commands...
- sudo apt-get install python-setuptools
- easy_install networkx
However pip is preferred to easy_install. So install pip using the following command...
sudo apt-get install python-pip
and then to install any package, type the following command,
sudo pip install <pip-package>
e.g. to install networkx, type
sudo pip install networkx