error igraph_attributes.h: No such file or directory when installing igraph

It takes me a lot of time to pip install python-igraph on a remote ubuntu machine. The  error I got is “igraph_attributes.h: No such file or directory.” but that is not the real problem.

The real problem happens when pip was trying to compile the c core of igraph and it failed due to missing library lxml2!. And what I really need is THE FOLLOWING:

sudo apt-get install libxml2-dev


ipython notebook server on a remote machine

Goal: running an ipython notebook server on a remote machine, and access from a local browser

How to: (shamelessly copied from someone’s blog

1. On the remote machine:

ipython notebook --no-browser --port=7777

2. On the local machine, my remote machine can only be accessed via a login node, so I need to use a multi-hop ssh tunnel. In order not to type the following every time, save it into a file.
ssh -L 7777:localhost:7777 $host1 ssh -L 7777:localhost:7777 -N $host2

If you don’t need to go through a login node, it is a little easier:

ssh -N -f -L localhost:7777:localhost:7777