Considering a brand new ubuntu docker container I ran the following in order inside and everything works:
#set up proxy (if needed)
export http_proxy=http://10.168.209.73:8012
export https_proxy=http://10.168.209.73:8012
export ftp_proxy=http://10.168.209.73:8012
#prepare
apt-get update
apt-get install wget -y
apt-get install build-essential -y
#install python
cd ~
mkdir tmp
cd tmp
wget http://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
tar zxvf Python-2.7.15.tgz
cd Python-2.7.15
./configure --prefix=$HOME/opt/python-2.7.15 --with-ensurepip=install
./configure --enable-optimizations
make
make install
#install zlib
wget http://www.zlib.net/zlib-1.2.11.tar.gz
tar -xvzf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --prefix=$HOME/tmp/zlib/zlib-1.2.11
make install
#install pip
apt install python-pip -y
pip install -U pip
#broken pip and then restart the container and it works ... go figure
# wget https://bootstrap.pypa.io/get-pip.py -O $HOME/tmp/pip/get-pip.py
# python $HOME/tmp/pip/get-pip.py
# pip install --user pipenv
# pip3 install --user pipenv
# echo "PATH=$HOME/.local/bin:$PATH" >> ~/.profile
# source ~/.profile
# whereis pip
#install mapillary uploader
apt-get update
apt-get install git-all -y
pip install git+https://github.com/mapillary/Piexif
pip install --upgrade git+https://github.com/mapillary/mapillary_tools
apt-get install ffmpeg -y