install libbz2-dev for specific python version code example Example: python Bz2 install sudo apt-get install libbz2-dev