iddqd
iddqd

Reputation: 1305

Installing and using python on a client computer

I am writing a small python installer application that will run on linux. However, i don't know which Linux in advanced, so i cant write for any specific python version since i have no idea what is installed on the client computer, if any (do i? is there any thumb rule for python version preinstalled on a Linux machine?).
Is there a optimal way to install a local python version on a client's computer in some temporary directory, use it for the application run-time, than remove it when it is done?

Upvotes: 1

Views: 97

Answers (2)

D. Jones
D. Jones

Reputation: 481

You can bundle your programs with Python itself without requiring the target machine installed Python Interpreter on it.

Check this out: https://wiki.python.org/moin/Freeze

Upvotes: 2

N3Cr0M0rPh
N3Cr0M0rPh

Reputation: 31

Do you know the machines architecture? If so simply download the python version you want to install on the linux architecture on your server/box/your computer then compress it and upload it to a server somewhere. (or use the link on python.org)

then simply make a bash script to download it and uncompress it. Then install it using shell commands like make or cmake ./configure within the install directory

If you dont know the architecture or are trying to use it on some generic or other you could cross compile it using these cross compilers to cross compile python (or anything coded in c(/c++?)) http://pastebin.com/mxWqBvy8

Typically the general 'rule of thumb' for the python version would be python2.7.x

You could use Pyinstaller to "compile" your python (its origanally win) there is a linux version somewhere, fairly sure its as easy as pyinstaller test.py)

Removing it shouldnt be that hard, rm is universal everywhere

Upvotes: 2

Related Questions