First, install some dependencies:

sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

Then download using the following command:

version=2.7.13
cd ~/Downloads/
wget https://www.python.org/ftp/python/$version/Python-$version.tgz

Extract and go to the directory:

tar -xvf Python-$version.tgz
cd Python-$version

Now, install using the command you just tried, using checkinstall instead to make it easier to uninstall if needed:

./configure
make
sudo checkinstall

Change version to whichever version you need (version=2.7.1 or version=3.6.0, for example).

Answer from Achu on askubuntu.com
🌐
Python
python.org › download › releases › 2.7
Python 2.7.0 Release | Python.org
DA38 2D18 A5B9 99CD EA9D A413 5B38). The Windows installer was signed by Martin von Löwis' public key, which has a key id of 7D9DC8D2. The Mac installers were signed with Ronald Oussoren's key, which has a key id of E6DF025C.
🌐
Python
python.org › downloads › release › python-2718
Python Release Python 2.7.18 | Python.org
Python 2.7.18 is the last release of Python 2. Download macOS 64-bit installer · Download Windows x86 MSI installer ·
🌐
GitHub
gist.github.com › ckandoth › f25c7469f23e63e34bee346fcb10ec29
Download, install, and build Python 2.7.10 in a local folder · GitHub
This might help someone trying to run a local installation of python 2.7 to test some legacy code (the script is meant to be read and not blindly run): old_python_install.sh
🌐
Samsclass
samsclass.info › 124 › proj14 › python2.7-win.htm
Installing Python 2.7 on Windows
In a Web browser, go to https://www.python.org/download/ Scroll down to find the latest version of Python 2.7, and click the blue Download link, as shown at the bottom of the image below.
🌐
Python
python.org › downloads › release › python-2716
Python Release Python 2.7.16 | Python.org
Attention macOS users: As of 2.7.16, all current python.org macOS installers ship with builtin copies of OpenSSL and Tcl/Tk 8.6. See the installer README for more information. Full Changelog · Download macOS 64-bit installer · Download Windows x86 MSI installer ·
🌐
The Hitchhiker's Guide to Python
docs.python-guide.org › starting › install › win
Installing Python 2 on Windows — The Hitchhiker's Guide to Python
If you want to be sure you are installing a fully up-to-date version, click the Downloads > Windows link from the home page of the Python.org web site . The Windows version is provided as an MSI package.
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 42041298 › how-to-install-python-2-7-in-windows
How to install Python 2.7 in Windows? - Stack Overflow
From the 2.7.0 doc : "Note: A bugfix release, 2.7.13, is currently available. Its use is recommended." ... Save this answer. ... Show activity on this post. Simply you can Download python2.7 with respect to your 32/64-bit processor and install it.
🌐
Python
python.org › downloads
Download Python | Python.org
Python 3.12.7 Oct. 1, 2024 Download Release notes · Python 3.12.6 Sept. 6, 2024 Download Release notes · Python 3.12.5 Aug. 6, 2024 Download Release notes ... Python 3.12.2 Feb.
🌐
SourceForge
sourceforge.net › home › open source software › software development › winpython › files
WinPython - Browse /WinPython_2.7 at SourceForge.net
WinPython /WinPython_2.7 files. Browse /WinPython_2.7 files for WinPython, Portable Scientific Python 2/3 32/64bit Distribution for Windows
🌐
Python
python.org › downloads › release › python-2714
Python Release Python 2.7.14 | Python.org
Python 2.7.14 is a bugfix release in the Python 2.7 series. Full Changelog · Download Mac OS X 64-bit/32-bit installer · Download Windows x86 MSI installer ·
🌐
PyTorch Foundation
pytorch.org
PyTorch Foundation
Stable (2.7.0) Preview (Nightly) Your OS · Linux · Mac · Windows · Package · Pip · LibTorch · Source · Language · Python · C++ / Java · Compute Platform · CUDA 11.8 · CUDA 12.6 · CUDA 12.8 · ROCm 6.3 · CPU · Run this Command: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 Previous versions of PyTorch ·
🌐
Python
python.org › downloads › release › python-272
Python Release Python 2.7.2 | Python.org
January 1, 2020 - DA38 2D18 A5B9 99CD EA9D A413 5B38). The Windows installer was signed by Martin von Löwis' public key, which has a key id of 7D9DC8D2. The Mac installers were signed with Ned Deily's key, which has a key id of 6F5E1540.
🌐
Linux From Scratch
linuxfromscratch.org › blfs › view › 12.0 › general › python2.html
Python-2.7.18
Download (HTTP): https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz
🌐
Pkgs.org
pkgs.org › download › python2.7
Python2.7 Download (DEB, RPM)
Download python2.7 packages for Debian, Fedora, Ubuntu
🌐
OldVersion.com
oldversion.com › development › python › python 2.7
Download Python 2.7 - OldVersion.com
OldVersion.com provides free software downloads for old versions of programs, drivers and games. So why not downgrade to the version you love?....
🌐
Python
python.org › search
Python 2.7.10
The official home of the Python Programming Language
🌐
Python
python.org › downloads › release › python-2710
Python Release Python 2.7.10 | Python.org
Python 2.7.10 is a bug fix release of the Python 2.7.x series. Full Changelog · Download Mac OS X 64-bit/32-bit installer · Download Windows x86 MSI installer ·