9

I once read about minimal python installation without a lot of the libraries that come with the python default installation but could not find it on the web...

What I want to do is to just pack a script with the python stuff required to execute it and make portable.

Does any one know about something like that?

Thanks

reshefm
  • 6,017
  • 8
  • 36
  • 40
  • 1
    most programs used to generate an executable from your python code allow you to choose to remove unwanted libraries, is that what you are talking about? – João Portela Jun 14 '10 at 07:28
  • See also the answers to this question: http://stackoverflow.com/questions/1689086/are-there-any-alternatives-to-py2exe – ʇsәɹoɈ Jun 14 '10 at 08:17

4 Answers4

7

Micro Python is actively maintained and has been ported to a bunch of microcontrollers.

For other small implementations, you might also want to check out tinypy or PyMite.

If you don't care about size, but really just want an easy way to distribute a python program, consider PyInstaller or one of the others on this list.

ʇsәɹoɈ
  • 22,757
  • 7
  • 55
  • 61
2

There's now finally Micro Python, claiming to be full reimplementation of Python 3 core, fitting even into medium-size 32bit microcontrollers. API will be different of course, so C modules will require porting. Project is funded via KickStarter, source code will be released some time after the campaign (request for consideration was made to author to not delay release of the source, to help bootstrap Micro Python community sooner).

http://micropython.org/

pfalcon
  • 6,724
  • 4
  • 35
  • 43
2

Portable python might do what you want. It's a python installation for USB thumb drives.

blokeley
  • 6,726
  • 9
  • 53
  • 75
  • 1
    Python 2.7 download amounts 240 MB. I am not going to check out Python 3.2. I'll wait for more minimal or portable release. – Val Jun 14 '15 at 19:49
  • Portable Python is not being developed anymore. @forest's answers (tinpy, micro python, pymite) are still-active alternatives. – Assad Ebrahim Jun 27 '18 at 09:28
  • new Python 2.7-3.8 (35 MB) https://sourceforge.net/projects/portable-python/files/ – Volodimir Kopey Feb 14 '20 at 14:03
2

You can also look for already installed instances.

OpenOffice / LibreOffice

Look at the environment variable UNO_PATH or into the default install directories, for example for Windows and LO5

%ProgramFiles(x86)%\LibreOffice 5\program\python.exe

Gimp

look into the default install directories, for example for Windows

C:\Program Files\GIMP 2\Python

and so on...

Massimo
  • 3,171
  • 3
  • 28
  • 41