Refine sum-energy.py and remove install packages.