Hi Shiyuan, I think the problem is that Emacs or babel is using python located in /usr/bin or /usr/local/sbin rather than default python or ipython. The way I got around this is rename python in these locations to python_old and then did a soft link to ipython (i.e., ln -s /anaconda/bin/ipython python).
I am sure there is a smarter way of telling babel to use ipython, but this was my work around. Hope this help cheers, M