This is the official method for installing the engine on an offline computer (often called a "Sneakernet" installation). You will need a computer with internet access first to download the files, and then a large USB drive or external hard drive to transfer them.
Before attempting to transfer the offline files, ensure your target machine meets the specifications for Unreal Engine 4.27: download unreal engine 4.27 offline installer
In versions 4.27 and earlier, you can bypass this by launching with the command line argument:
UE4Editor.exe -NoEpicPortal
Create a shortcut and add this to the target field. This is the official method for installing the