©2018 by Zach Pfeffer


Build a Faster Python

January 22, 2019

This post lists the commands to build Python 2.7.12 on Ubuntu with Profile Guided Optimization and install the result into a local directory.




#Open a terminal

mkdir -p ~/fastpython2/src
mkdir -p ~/fastpython2/install
cd ~/fastpython2/src
wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz 
tar -zxvf Python-2.7.12.tgz 
cd Python-2.7.12
./configure --prefix=${HOME}/fastpython2/install/
make profile-opt                                                                                                                              
make install 
export PATH="${HOME}/fastpython2/install/bin:${PATH}"
which python


Validated On


Validated on a Virtual Machine called fresh-ubuntu-16.04.3-desktop-amd64-4GB-RAM-100GB-Disk with 4GB RAM and a 100 GB VMDK, dynamically allocated disk, running a fresh install of Ubuntu 16.04.3, with no updates but with host-extensions installed, on VirtualBox Version 5.2.12 r122591 (Qt5.6.2) on Windows 7 SP1.

Please reload

Our Recent Posts

Business Classifications from Sandia National Laboratories

March 24, 2020

"Guidance for Completing the Company Commercialization Metrics Survey" from NASA 2020 SBIR/STTR

March 21, 2020

Army 20.1 SBIR TABA Funding Clarification: is $5k "On Top" of the $167,500 Available?

February 18, 2020

Please reload


Please reload