How to get Python compiled and installed on a DD-WRT router?

Discussion in 'DD-WRT Firmware' started by cog_7, Oct 26, 2012.

  1. cog_7

    cog_7 Serious Server Member


    I am a newbie and I want to cross compile (or port) the source code of the Python 3.3.0 Application ( and place it on a router running the firmware DD-WRT.

    I would be grateful if someone could give me the step by step procedure to accomplish the above.
    Example: What application(s) I would need; What has to be configured, etc.

    (i) The router has on Optware. It would be great also if the completed python package could be installed via this route - It is not a must though.
    (ii) My router: ASUS RT-N16.
    (iii) The firmware: DD-WRT v24-sp2 (03/19/12) mega - build 18774
    (iv) I know there is a python V3.2.3 package available already, but it has a bug in it (.../opt/lib/python3.2/ RuntimeWarning ...), so that is why I want to compile the latest version; Plus can't get a reply from the package maintainer.
    (v) I don't mind using ubuntu for the OS of a cross-compiler to make things happen.
    (vi) I have a whole project that I have been working on for months on hold right now because of this situation. Any assistance would be appreciated.

  2. lancethepants

    lancethepants Network Guru Member

    I recently have been playing around with this. I also wanted python with a certain set of modules, so I decided to compile it myself. I'm however using python 2.7. I've created a github repo, that with maybe a bit of tweaking you can get the version of python you want to work.

    It may just work substituting the newer python source, but can't know for sure til you try.

    Currently this repo is using the entware toolchain, which I highly recommend, but you should be able to use the optware or any other also. I've called the repo tomatoware, but this is really firmware agnostic since it uses the entware libraries, and should run on about anything mipsel. This is a work in progress, but compiles python perfectly fine for everything I've tried it with. For your needs, look at and You can trim for just the things you need, but most the libraries that occur before python are used (but optional) in python.

    If you're running Ubuntu, I'm not absolutely sure of all the packages you'll need to install, but I think the ones mentioned in this link should about cover it.

    Good luck. Let me know if you need any more assistance.
  3. cog_7

    cog_7 Serious Server Member

    Thanks a lot LanceThePants: I would see how things go and let you know how they turn out. I expect that you should be hearing back from me within 1 - 4 days.

    Thanks again.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice