install libbz2-dev for all python versions code example Example: python Bz2 install sudo apt-get install libbz2-dev