I installed Python 3.6 on Ubuntu 16.04 by using Jonathon Fernyhough\'s PPA:
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get
If most voted answer does not work for you please try below steps (Keep in mind you must change [version]):
sudo apt install python3-aptcd /usr/lib/python3/dist-packagesls to find correct version of apt_pkg.cpython-[version]-i386-linux-gnu.so in my case it was 35msudo cp apt_pkg.cpython-[version]-i386-linux-gnu.so apt_pkg.so DON'T FORGET: type your [version] Troubleshouting
If you get error cp: cannot stat 'apt_pkg.cpython-[your-version]-i386-linux-gnu.so': No such file or directory try commands below:
rm -rf apt_pkg.sosudo cp apt_pkg.cpython-[version]-i386-linux-gnu.so apt_pkg.so DON'T FORGET: type your [version]