Per the comment in this commit, distribute_setup.py assumes that if you had to download distribute you did *not* already have the pkg_resources, which is a false assumption on Ubuntu. Make sure to pkg_resources is unloaded before importing the newly downloaded setuptools, because we want to use the pkg_resources that it ships with and not the one installed by the system.