Is it possible to install python 2.7 without the internet in centos 5? Any help would be appreciated.
The responsible thing to do is to upgrade the OS, as CentOS 5 is end of life. Conveniently EL 7 defaults to Python 2.7.
If you will not upgrade the distro, first find the packages you want to install. (I don't have a recommendation because the software collection for Python does not have a EL5 build.) You may present a yum repository to this system a couple ways: with removable media, or a connection to a local mirror that does have Internet.