I have a device running an embedded OS (Custom Linux buildroot). It is offline and has no package manager (apt, yum, et al.) and Python has several missing modules, one of which is key for our application to run. Python also does not have pip either (which makes a kind of sense, it being an offline system).

I cannot rebuild the OS since it is currently running and mission-critical systems have to stay up. All I need to do is add the Python sqlite3 module to this thing and poof, application is in business.

On my development box, I have tried doing a

pip freeze > reqs.txt

to see what modules I am using, but none of the Python default modules are listed, most notably sqlite3.

Can I just copy the module directly from my Python modules folder to the device's Python modules folder and be done, or is this going to make a mess?

Forgive the seemingly noob question, but I've never played with this kind of offline scenario when Python isn't fully realized on the machine., and given that I can't have the app throwing errors on the running box, I'm leery of just tinkering.

  • 2
    sqlite is unlikely to become a tag here since it's a library for software developers to use and not a dbms to be installed. I recognise it has a comandline interface, but stackoverflow gets those questions and rarely U&L. Sep 20, 2023 at 20:27
  • 2
    sqlite3 isn't a package you can install with pip anyway since it's bundled with python itself. I would rebuild the OS on a virtual machine and try to figure out why these files are missing. If they are not missing in the new OS build, then copy them out of the VM as they have a better chance of being compatible with what you have on your embedded machine, that what you have on your workstation. Sep 20, 2023 at 20:41
  • @PhilipCouling yup. that's what i wound up doing. and as to WHY this happened: the previous dev/admin was a dumbass who obviously didn't know what he was doing. can't even begin to understand why you'd edit python intended for SCADA control such that i has neither sqlite3 or socket. **slap** at any rate, thanks for the effort. it was gratifying to know my solution wasn't terrible. :)
    – WhiteRau
    Sep 21, 2023 at 15:44


You must log in to answer this question.

Browse other questions tagged .