It is an issue with the fact you installed Python from source.
You need to install the zlib1g-dev
package to provide the headers to Python to be able to compile in zlib support:
sudo apt-get install zlib1g-dev
You may be missing other dependencies; here is a list of packages I'd install if I were to compile Python on an Ubuntu machine:
build-essential
libbz2-dev
libncursesw5-dev
libreadline5-dev
libssl-dev
libgdbm-dev
libc6-dev
libsqlite3-dev
tk-dev