Entware provides a way to install software packages in your router. This way you can have python, perl and many other packages that can be executed in your router. For entware-ng to be installed we need a USB stick that mounts in /opt. To achieve that follow the procedure here

Installing Entware-ng

Establish an SSH connection to your router and navigate to /opt

root@DD-WRT:~# cd /opt
root@DD-WRT:/opt# ls -ltr
drwx------    2 root     root         16384 Dec  7 15:37 lost+found
root@DD-WRT:/opt#

Now we will download entware-ng from github and install

wget -O - http://pkg.entware.net/binaries/armv7/installer/entware_install.sh | sh

Note: Linksys WRT1900ACS v2 is an ARM device. For MIPS devices you should use the MIPS specific package

wget -O - http://pkg.entware.net/binaries/mipsel/installer/installer.sh | sh

Check the printout of the installation for any errors. If all has gone well you should be able to install any of the available packages of entware-ng.

Installing packages with Entware-ng

You can see the available packages with:

opkg list

You can see the already installed packages with:

opkg list-installed

To install a package (for example python):

opkg install python