There are a lot ways to setup emacs as a python IDE. I tried some of them and still failed to setup my own. (I'm an emacs newbie) After some google works, I finally find a way to make auto complete and virtualenvs work.
Elpa and melpa are really slow in China. So I use el-get because it uses github to install most of packages.
Install company mode
Install python dependencies of anaconda-mode
company-anaconda will install anaconda automatically. However, it seems doesn't install the python dependencies. To install it, cd to ~/.emacs.d/el-get/anaconda-mode and run command
pip install -r requirements.txt -t . But I got following error on my mac:
error: must supply either home or prefix/exec-prefix -- not both. I googled the error and got the solution on StackOverFlow. The link is here.
Sofar, auto completion for python should work. After this step, I found pip doesn't work. Please delete .pydistutils.cfg...
Make ipython the default python interpreter
Emacswiki has the configuration to use ipython in python.el. Link