You shouldn't need the "deadsnakes" PPA, as far as I know. python2.7-dev
is still available for Ubuntu.
Follow the directions at https://openwrt.org/docs/guide-developer/build-system/install-buildsystem then move to the next page on starting your first builds.
From Build scripts that document changes and enable easy re-creation of build environment
### Prerequisites for buildroot
sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev
sudo apt-get install gawk gcc-multilib flex git-core gettext libssl-dev
### Prerequisite on Ubuntu 17.10 as it has python3 by default
sudo apt-get install python
You may also need "GNU time" -- see How install GNU gtime to avoid feeds and make menuconfig error if it isn't already installed on your system.