473,287 Members | 3,240 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Minimal Python installation?

Hi,

I'd like to put the python library and interpreter on a small embedded
Linux x86 compatible device where disk space is an issue. I played
around with the minimal Python interpreters, but was not entirely happy
with them, so my question is, is there an (preferably easy) way to put
the interpreter and a cut-down version of the python library/modules
that ship with regular Python into a new archive that I can safely copy
and use? My current method is to copy the python interpreter and the
python shared library to the device. Then I create a tar archive with
all startup files from the site package directory to my archive using
the following one-liner:

strace -f -eopen python -c 'pass' 2>&1 | grep -v ENO | grep '\.py' | awk
'BEGIN { FS="\"" } { print $2 }' | tar cvf x.tar -T -

This effectively packs all python library files that are accessed upon
startup into a tar archive. But I figure this method is not what I want
because there surely are files I am missing here (for example which are
accessed when starting a script), and what I really want is a minimal
environment that works. Let's say I want a complete Python install, but
without all the batteries :-)

Any pointers?

Regards,
Thomas.
Jun 27 '08 #1
1 4054
On 21 Mai, 12:07, Thomas Troeger <thomas.troeger....@siemens.com>
wrote:
>
I'd like to put the python library and interpreter on a small embedded
Linux x86 compatible device where disk space is an issue. I played
around with the minimal Python interpreters, but was not entirely happy
with them, so my question is, is there an (preferably easy) way to put
the interpreter and a cut-down version of the python library/modules
that ship with regular Python into a new archive that I can safely copy
and use?
Perhaps there are some projects on the following pages which may help
in some way:

http://wiki.python.org/moin/EmbeddedPython
http://wiki.python.org/moin/Tiny_Python

[...]
Let's say I want a complete Python install, but without all the batteries :-)
I think there's an overlap between "installer" tools and some of the
projects mentioned on the above pages, especially where retaining only
the critical libraries in the resulting distribution is concerned.

Paul
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or...
3
by: Zunbeltz Izaola | last post by:
Hi, I've build and installed python 2.2 and python2.3 in a linux box. Now i want to install some packages (Numeric, wxPython and scipy). I've install Numeric and wxPython for python2.3 without...
3
by: Matthias Baas | last post by:
Hi, are there any guidelines about what to do if a Windows extension for Python 2.4 requires the C++ runtime (msvcp71.dll)? If I want to distribute a binary installer of an extension that...
9
by: TPJ | last post by:
First I have to admit that my English isn't good enough. I'm still studying and sometimes I just can't express what I want to express. A few weeks ago I've written 'Python Builder' - a bash...
1
by: José Joye | last post by:
I know, this kind of question has already been asked. However, I could not find an answer related to the minimal privilege required to be able to create a new event Source in the appplication event...
17
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.2 (final). Python 2.4.2 is a bug-fix release. See the release notes at the ...
1
by: Srijit Kumar Bhadra | last post by:
I have browsed the following links 1) http://peak.telecommunity.com/DevCenter/EasyInstall 2) When Python *Eggs* better than Python *distutils*?? What's Eggs? (http://tinyurl.com/m8dyd) But I am...
13
by: Daniel Fetchinson | last post by:
Was looking at PEP 3108, http://www.python.org/dev/peps/pep-3108/ , Is it just me or others also think that it would be a major loss to remove tkinter from the python core? PEP 3108 starts off...
7
by: greg | last post by:
Thomas Philips wrote: Have a look in /Library/Frameworks/Python.framework/Versions/2.5 You can't -- this feature only exists in the Search window, which is a different kind of window...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.