1. Pypy
  2. Untitled project
  3. pypy.org


pypy.org / source / download.txt

layout: page
title: Download and install


.. class:: download_menu

  There are `nightly binary builds`_ available. Those builds are not always
  as stable as the release, but they contain numerous bugfixes and 
  performance improvements.

Here are the various binaries of **PyPy 1.9** that we provide for x86 Linux,
Mac OS/X or Windows.

.. class:: download_menu

 * Download                         
   * `Default (with a JIT Compiler)`_
   * `Other versions`_

 * `Installing`_ (optional)
 * `Building from source`_                       
 * `Packaging`_
 * `Checksums`_

.. _`Default (with a JIT Compiler)`:

"JIT Compiler" version

These binaries include a Just-in-Time compiler.  They only work on
x86 CPUs that have the SSE2_ instruction set (most of
them do, nowadays), or on x86-64 CPUs. They also contain `stackless`_
extensions, like `greenlets`_.
(This is the official release 1.9;
for the most up-to-date version see below.)

* `Linux binary (32bit)`__
* `Linux binary (64bit)`__
* `Mac OS/X binary (64bit)`__
* `Windows binary (32bit)`__ (you may need the `VS 2009 runtime library installer vcredist_x86.exe`_)

.. __: https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux.tar.bz2
.. __: https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux64.tar.bz2
.. __: https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-osx64.tar.bz2
.. __: https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-win32.zip
.. _`VS 2009 runtime library installer vcredist_x86.exe`: http://www.microsoft.com/en-us/download/details.aspx?id=5582

If your CPU is really old, it may not have SSE2.  In this case, you need
to translate_ yourself with the option ``--jit-backend=x86-without-sse2``.

.. _`Other versions (without a JIT)`:

Other versions

The other versions of PyPy are:

* The most up-to-date `nightly build`_ with a JIT, if the official
  release is too old for what you want to do.

* No JIT: A version without the JIT.  Consumes a bit less memory
  and may be faster on short-running scripts.  (Note that a similar
  effect can be obtained by running ``pypy --jit off``.)

* Sandboxing: A special safe version.  Read the docs about sandboxing_.
  (It is also possible to translate_ a version that includes both
  sandboxing and the JIT compiler, although as the JIT is relatively
  complicated, this reduces a bit the level of confidence we can put in
  the result.) **Note that the sandboxed binary needs a full pypy checkout
  to work**. Consult the `sandbox docs`_ for details

  * `Linux binary (64bit)`__

  * `Linux binary (32bit)`__

.. __: https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-sandbox-linux64.tar.bz2
.. __: https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-sandbox-linux.tar.bz2
.. _`sandbox docs`: http://doc.pypy.org/en/latest/sandbox.html

These versions are not officially part of the release 1.9, which focuses
on the JIT.  You can find prebuilt binaries for them on our
`nightly build`_, or translate_ them yourself.

.. _`nightly build`: http://buildbot.pypy.org/nightly/trunk/


All binary versions are packaged in a ``tar.bz2`` or ``zip`` file.  When
uncompressed, they run in-place.  For now you can uncompress them
either somewhere in your home directory or, say, in ``/opt``, and
if you want, put a symlink from somewhere like
``/usr/local/bin/pypy`` to ``/path/to/pypy-1.9/bin/pypy``.  Do
not move or copy the executable ``pypy`` outside the tree --- put
a symlink to it, otherwise it will not find its libraries.

.. _translate:

Building from source

1. Get the source code.  The following packages contain the source at
   the same revision as the above binaries:

   * `pypy-1.9-src.tar.bz2`__ (sources, Unix line endings)
   * `pypy-1.9-src.zip`__ (sources, Unix line endings too, sorry)

   .. __: https://bitbucket.org/pypy/pypy/get/release-1.9.tar.bz2
   .. __: https://bitbucket.org/pypy/pypy/get/release-1.9.zip

   Or you can checkout the current trunk using Mercurial_ (the trunk
   usually works and is of course more up-to-date)::

     hg clone https://bitbucket.org/pypy/pypy

2. Make sure you **installed the dependencies.**  See the list here__.

   .. __: http://pypy.readthedocs.org/en/latest/getting-started-python.html#translating-the-pypy-python-interpreter

3. Enter the ``goal`` directory::

     cd pypy/pypy/translator/goal

4. Run the ``translate.py`` script.  Here are the common combinations
   of options (works also with ``python`` instead of ``pypy``)::

     pypy translate.py -Ojit                # get the JIT version
     pypy translate.py -O2                  # get the no-jit version
     pypy translate.py -O2 --sandbox        # get the sandbox version
     pypy translate.py -Ojit --backend=cli  # only for branch/cli-jit

5. Enjoy Mandelbrot ``:-)``  It takes on the order of half an hour to
   finish the translation, and 2.x GB of RAM on a 32-bit system
   and 4.x GB on 64-bit systems.  (Do not start a translation on a
   machine with insufficient RAM!  It will just swap forever.  See
   notes below in that case.)


* It is recommended to use PyPy to do translations, instead of using CPython,
  because it is twice as fast.  You should just start by downloading an
  official release of PyPy (with the JIT).  If you really have to use CPython
  then note that we are talking about CPython 2.5-2.7 here, not CPython 3.x.

* If RAM usage is a problem (or if you are on Windows, because win32's limit
  is 2 GB unless you hack a lot), then you can (for now) tweak some parameters
  via environment variables and command-line options.  The following command
  takes a bit more time, but finishes with only using 3.0 GB of RAM (on
  Linux 64-bit; probably not much more than 1.6 GB on 32-bit).  It should be
  noted that it is less than with CPython. ::

    PYPY_GC_MAX_DELTA=200MB pypy --jit loop_longevity=300 ./translate.py -Ojit

* Because of ``asmgcroot``, compiling the generated C files containing the JIT
  is delicate.  It requires using either MSVC or gcc with no particularly
  fancy options.  It does not work e.g. with clang, or if you pass uncommon
  options with the ``CFLAGS`` environment variable.  You can also try to
  compile PyPy with the `shadow stack`_ option.

.. _`x86 (IA-32)`: http://en.wikipedia.org/wiki/IA-32
.. _`x86-64`: http://en.wikipedia.org/wiki/X86-64
.. _SSE2: http://en.wikipedia.org/wiki/SSE2
.. _`contact us`: contact.html
.. _`sandboxing`: features.html#sandboxing
.. _`stackless`: http://www.stackless.com/
.. _`greenlets`: http://codespeak.net/svn/greenlet/trunk/doc/greenlet.txt
.. _Mercurial: http://mercurial.selenic.com/
.. _`nightly binary builds`: http://buildbot.pypy.org/nightly/trunk/
.. _`shadow stack`: http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html


Once PyPy is translated from source the binary package similar to those provided in the section `Default (with a JIT Compiler)`_ above could be easily created with ``package.py`` script as following::

    cd ./pypy/pypy/tool/release/
    python package.py ../../.. pypy-my-own-package-name


Here are the checksums for each of the downloads (md5 and sha1)::

   201d2cce2557e40c784473b471ee1b6b  pypy-1.9-linux64.tar.bz2
   1a08c88642434fc2e0e4256d351f48db  pypy-1.9-linux.tar.bz2
   aad9c4b7b827583e37fe8ae0f7cfe0ff  pypy-1.9-osx64.tar.bz2
   e7655066baed3c7bbbca7df617817dd5  pypy-1.9-win32.zip
   2c9f0054f3b93a6473f10be35277825a  pypy-1.8-sandbox-linux64.tar.bz2
   009c970b5fa75754ae4c32a5d108a8d4  pypy-1.8-sandbox-linux.tar.bz2
   f92c0171a9578a3e4a0f74947ec596ab  release-1.9.tar.bz2 (source)
   1c06cc5c35fa17e59acb51e11cdc9b03  release-1.9.zip (source)

   51be6b7b802a5239a759e04ae9595082e17c4c70  pypy-1.9-linux64.tar.bz2
   1bc5d2467039b954f9b7395b3ee1b8407ce1c057  pypy-1.9-linux.tar.bz2
   825e15724419fbdb6fe215eeea044f9181883c90  pypy-1.9-osx64.tar.bz2
   4f060f4fab0f07bbc7de0ac8f95275eb08d726a3  pypy-1.9-win32.zip
   895aaf7bba5787dd30adda5cc0e0e7fc297c0ca7  pypy-1.8-sandbox-linux64.tar.bz2
   be94460bed8b2682880495435c309b6611ae2c31  pypy-1.8-sandbox-linux.tar.bz2
   4f060f4fab0f07bbc7de0ac8f95275eb08d726a3  release-1.9.tar.bz2 (source)
   c3af78c96d73d46e3a6d16d3cd548d9ea48a1820  release-1.9.zip (source)