Copying a compiled Python from one system to another

Michael Torrie torriem at gmail.com
Sat Oct 1 10:21:11 EDT 2016


On 10/01/2016 05:21 AM, Steve D'Aprano wrote:
> Long story short: I have no working systems capable of compiling the
> latest Python 3.6, and no time to upgrade my usual machines to
> something which will work.
> 
> However I do have access to another machine (actually a VM) which
> can compile Python 3.6. It's not practical for me to use it as a my
> main development machine, but as a temporary measure, I thought I
> could compile 3.6 on this VM, then copy the python binary to my usual
> desktop machine.
> 
> What sort of challenges am I likely to find? Both machines are Linux,
> but different distros.

If they use the same major version of glibc, both are either 64-bit or
32-bit, then if you compile to a self-contained location like /opt and
then copy that folder over it will run just fine.

If you compile to /usr, you'll have to make sure you tar up all the bits
that are scattered around the various directories under /usr.

What distros are we talking about here?  Ideally it would be nice to
build install-able packages for the target OS.



More information about the Python-list mailing list