eGenix PyRun™ is our one file, no installation version of Python, making the distribution of a Python interpreter to run based scripts and applications to Unix based systems as simple as copying a single file.
The executable is only 12MB in size, does not require a system wide installation, but still supports most Python application and scripts.
Compared to a regular Python installation of typically 100MB on disk, eGenix PyRun is ideal for applications and scripts that need to be distributed to several target machines, client installations or customers.
It makes "installing" Python on a Unix based system as simple as copying a single file.
We gave a talk about eGenix PyRun at the EuroPython 2012 conference in Florence. You can find the video of the talk on YouTube:
eGenix PyRun 1.0.0 needs these third party tools to be available on the target machines:
Future versions of PyRun will add more flexibility to the build process to make the requirements more customizable.
If you want to compile PyRun yourself, you will need the development
packages of the above tools, a C compiler and a GNU make compatible make
eGenix PyRun is covered by the eGenix.com Public License Agreement 1.1.0 which is an Open Source license based on the CNRI Python license. Since PyRun also pulls in Python, the respective Python license also applies to the resulting pyrun binary. See the eGenix PyRun license page for more details.
In simple words, you are free to use the software without paying fees or royalties as long as you give proper attribution and keep the license documents together with the software. Please see the license document for details and consult a lawyer if you have legal questions.
The following documentation is available for eGenix PyRun:
The manual includes a usage guide, an explanation of the build procedure and discusses a few common use cases.
The PDF file is also available as part of the installation and can be found in the
Please note that the documentation
for the 1.0.0 release is not yet as complete and comprehensive as it
should be. We're working on it.
For details on how to use Python via eGenix PyRun, please refer to the official Python documentation.
You can use any of the available Python books to learn to use Python with PyRun.
We provide pre-compiled binaries of PyRun for a number of platforms, and also make the sources available, so you can build your own variants.
eGenix PyRun does not support Windows in the current release.
Solaris binaries can be made available on demand.
AIX binaries can be made available on demand.
If you need binaries for platforms not mentioned here, please contact firstname.lastname@example.org for details. It is very likely that we can find a way to help you.
Python can be built as narrow Unicode version (UCS2) or wide Unicode version (UCS4).
If you want to interface to system installed Python libaries, you need to download the right variant for your platform. Most Unixes ship with wide Python builds these days (including RedHat and SuSE). In order to make sure, please run the following command which will tell you what kind of Python installation you have:
python -c "import sys;print(sys.maxunicode<66000)and'UCS2'or'UCS4'"
If you get errors such as "unresolved symbol PyUnicodeUCS2_AsEncodedString" when trying to load an extension from eGenix PyRun, you have likely installed a binary for different Unicode version.
For full details on how to install, setup and configure eGenix PyRun, please see the eGenix PyRun User Manual. It is available as PDF for offline reading and HTML for online reading:
eGenix PyRun currently does not support Windows platforms.
Simply download a suitable binary distribution for the version of Python and platform you need and extract it to a base directory where you'd like PyRun to live. Then use the eGenix PyRun executable like you'd use a regular Python interpreter, e.g.
./bin/pyrun2.7 myscript.pyYou can also put pyrun into the shebang of the script, e.g.
# Hello World Demo
print "Hello World!"
Please note that the binary distributions contain more than just the PyRun executable. They also come with a few extra standard library extensions which are normally not part of PyRun and the include files needed to compile Python extensions for use with PyRun.
If you are just looking for the plain single-file PyRun executable, only extract the file
bin/pyrunX.X (with X.X being the
underlying Python version, e.g. 2.7) from the binary distributions.
To further simplify installation of eGenix PyRun, we've created a
bash script which you can use to easily install PyRun in a similar way
to how you'd use the virtualenv script. The script is called install-pyrun and available from our download server.
Usage is simple:
The script also offers a few options to adjust various parameters. It
uses curl to download the packages, so you need to have curl installed
on your platform.
If you want to install other libraries or packages for use in eGenix PyRun, you need to pay a little more attention to where you copy the executable. eGenix PyRun assumes the following directory layout relative to the executable (with X.X being the underlying Python version, e.g. 2.7):
lib/pythonX.X directory is used as location of the Python
libaries and automatically put on
sys.path in case it is available. Optional packages installed through distutils or setuptools will go into the corresponding
lib/pythonX.X directory may also contain Python standard library extension modules in the
sub-directory which are not integrated into the eGenix PyRun
executable. The prebuilt binary distributions come with a set of
include/pythonX.X directory is only needed in case you want to
compile Python C extensions. It is available as
part of the prebuilt binary distributions we make available.
In order to build your own version, simply download the above source archive, untar/unzip it to a temporary directory and follow these steps:
This will download the Python source distribution and start a build
of eGenix PyRun. The result will be installed to the directory
/usr/local/ using the directory layout as described above.
If you'd like to build a binary distribution archive, use the following commands instead:
You can then pick up the distribution archive from the
If you would rather install to a different directory, you can add the make parameter
PREFIX=/path/to/pyrun/, This will cause make to install eGenix PyRun in
If you want to build against a specific Python version, you can specify the version using the make parameter
PYTHONFULLVERSION=2.7.3. Please have a look at the
PyRun/Makefile for more ways of customizing the setup.
For future versions of eGenix PyRun, we plan to make the setup
customizable via a top-level setup.py file so you can use Python to
trigger the build, customize the included standard lib extension modules
eGenix offers these support options:
Professional level support for this product as well as all other eGenix products and Python itself is available directly from the developers at eGenix.com.
eGenix.com offers professional consulting services for all questions and tasks around this product, including customized modifications, help with integration and on-site problem solving. Please contact email@example.com for details.
eGenix PyRun has been in use in production as part of our mxODBC Connect Server client-server database product for many years.
We are pleased to make it available to a wide public.
Please see the change log for details regarding changes to the package between releases.