Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
151 lines (106 sloc) 5.59 KB
Installing Pyjamas
DO NOT install the pyjamas libraries into /usr/share/python-support,
/usr/lib/python2.N/site-packages or ANY location where the "standard"
python interpreter could possibly pick them up. The pyjamas libraries
have nothing to do with python libraries when used by the compiler,
and contain replacements for, and other modules that
are critical to pyjamas. It goes without saying that if you overwrite
the standard python modules with the pyjamas equivalents, you will run into
massive problems. Don't do it.
For pyjamas javascript compilation, you need python 2 - that's it.
For Pyjamas Desktop, you will need:
* python-jsonrpc which can be downloaded from
if you wish to use JSONRPC.
* Win32 comtypes; or python-hulahop and python-xpcom, or a patched
version of pywebkitgtk and webkit-gobject
These are for the MSHTML, XULrunner and Webkit ports of Pyjamas
Desktop, respectively.
* comtypes is available here:
* python-xpcom requires XULrunner. it's _big_. it is recommended that
you use a standard gnu/linux distribution build. if you ever manage
to get XULrunner and python-xpcom compiled for win32, you are officially
a hero: please tell everyone about it on pyjamas-dev.
use this code, for now:
Developer Sandbox Setup
"Sandbox" setup simply refers to an installation that can be used
where it is placed, on the filesystem, without affecting any other
installations. The consequences of performing a "sandbox" install
are that you can have as many "sandbox" installs as you like, each
completely unrelated and having absolutely nothing to do with each
Zope, Django and many other python systems make prevalent use of
"sandbox" installs. Every django app is its own "sandbox". The
creation of a "sandbox" in python is actually incredibly simple:
all that is required is that a hard-coded path is inserted into
sys.path. This job is covered by
In this directory run:
The files ``pyjd/``, ``./bin/pyjsbuild``, ``./bin/pyjscompile``
and ``pyjd`` will be created, custom-tailored with hard-coded paths specific
to the exact absolute location that the command is run from.
In this way, you will be able to install, test and use multiple versions
of Pyjamas, without cross-interference.
As they contain hard-coded paths, these custom-tailored commands CANNOT
be "moved around". If you move the pyjamas installation, re-run
to recreate the commands, with suitable hard-coded paths.
To build pyjamas apps see ``./bin/pyjsbuild --help``
On windows the files ``pyjd/``, ``./bin/``,
``./bin/pyjsbuild.bat``, ``./bin/`` ``./bin/pyjscompile.bat``
and ``pyjd.bat`` will be created. The .bat files are the commands to be used. They invoke the corresponding .py files (if any).
Pyjamas Desktop
Sandbox installs of Pyjamas Desktop are tricky. For pyjd applications
to work, you will need to be able to import pyjd (built using
python see above).
There are two options for doing this:
1) export PYTHONPATH={path to pyjamas} (or use bin/pyjd, which does this)
2) break the sandbox rules (specifically for pyjd) and run:
python install
If you decide to break the sandbox rules for pyjd, then, just as above,
with pyjd/ containing hard-coded paths pointing to wherever
you happened to create the sandbox, you MUST not "move around" the
sandbox subdirectory, without also re-running and re-running
"python install".
System Installation
If you are installing pyjamas system-wide, for use by MORE THAN ONE
developer of the same multi-user system, follow the instructions in
this section. If you are the only person using pyjamas, or you
intend to have several versions of pyjamas, DO NOT attempt a system-wide
install. In order to keep the pyjs-specific versions of libraries
such as the reimplementations of, etc. there are some
tricky hoops that have to be jumped through. System-wide installs
should either be done by installing pre-built packages, or done WITH
EXTREME CARE. So - if you do not know what you are doing, and break your
system, tough luck: you should have listened.
First, you must use to create suitable ./bin/pyjsbuild
and ./bin/pyjscompile commands. For example:
python /usr/bin /usr/share/pyjamas
After ./pyjd/, ./bin/pyjsbuild and ./bin/pyjscompile have been
created, they can now be installed system-wide, along with the libraries.
python install
You *may* need to specify --install-data={pickasuitablelocation}
and you *may* need to specify the same location to the
command (prior to running
python /usr/bin {pickasuitablelocation}
The commands pyjscompile and pyjsbuild will be installed;
the boilerplate web templates, the pyjamas "builtin" libraries
and the UI Widget libraries will be installed as data libraries
which pyjscompile and pyjsbuild will know about. The default
path is:
You can over-ride this default location with the PYJSPREFIX
environment variable.
Something went wrong with that request. Please try again.