I'm trying to get python working in my Asus RT-AC51U. I got python3 and pip installed and working on a USB stick using opkg with -d. But pip3.9 seemed to have /usr/bin hard coded and couldn't find python. I changed that to #!/mnt/sda1/usr/bin/python3</code>
Now I can run pip, but can't install any modules with it. It runs for ages and then stops e.g. with "killed" which seems to be due to out of memory. Was about 34 MB virtual according to dmesg.
Of course they have a lot more RAM and "disk" space.
But is it possible to get this working? Pip seems to be the problem. I don't need it for anything else than installing this module. How to install it without pip?
I got this solved. I just compared what I had in my PC at /usr/lib/python3.9/site-packages/ to what the module tar.gz had. Then I just copied the files to /mnt/sda1/usr/lib/python3.9/site-packages/.
Works just fine although the python code I use takes 7.5 s to run compared to 0.5 s on a remote PC.
Pip doesn't seem to be made for such a small systems. Shouldn't be that hard to do some checks and then copy files.