6

Is it possible to cross-compile Python packages using PIP?

I'm trying to install several Python packages containing significant portions of C/C++ (scipy/numpy/matplotlib/pynacl) on a Raspberry Pi. Installing these packages on an x86 machine takes under a minute, but because the Pi is so underpowered, and there are no pre-compiled binary packages for ARM, it takes the Pi a couple hours to compile and install everything.

Is there anyway to compile and install these packages into a special virtualenv on an x86 machine, but targeting the ARM platform, and then rsync the virtualenv onto the Pi? Both the Pi and x86 are running Ubuntu 16.

Cerin
  • 60,957
  • 96
  • 316
  • 522

1 Answers1

1

Take a look at proot. It is made for such things as you describe:

https://proot-me.github.io/

ryeager
  • 873
  • 1
  • 10
  • 24