---
layout: page
title: Download and install
---

Download
============================================================

.. 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.5** 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`_                       
 * `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.
(This is the official release 1.5;
for the most up-to-date version see below.)

* `Linux binary (32bit)`__
* `Linux binary (64bit)`__
* `Mac OS/X binary (64bit)`__
* `Windows binary (32bit)`__ (BETA!) (you may need to install the `VS 2010 runtime libraries`_)

.. __: http://pypy.org/download/pypy-1.5-linux.tar.bz2
.. __: http://pypy.org/download/pypy-1.5-linux64.tar.bz2
.. __: http://pypy.org/download/pypy-1.5-osx64.tar.bz2
.. __: http://pypy.org/download/pypy-1.5-win32.zip
.. _`VS 2010 runtime libraries`: http://www.microsoft.com/downloads/en/details.aspx?familyid=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84

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.

* Stackless: Provides Stackless_ extensions, as well as greenlets_.
  It is not possible right now to combine Stackless features with the JIT.
    
* 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.)

These versions are not officially part of the release 1.5, 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/


Installing
-------------------------------

All 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.5/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.5-src.tar.bz2`__ (sources, Unix line endings)
   * pypy-1.5-src.zip (sources, Windows line endings) not available

   .. __: http://pypy.org/download/pypy-1.5-src.tar.bz2

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

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

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

   .. __: http://codespeak.net/pypy/trunk/pypy/doc/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 -O2 --stackless      # get the stackless 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 GB of RAM on a 32-bit system
   and 4 GB on 64-bit systems.  (Do not start a translation on a
   machine with insufficient RAM!  It will just swap forever.)

Notes:

* It is recommended to use PyPy to do translations, instead of using CPython,
  because it is twice as fast.  (Using CPython would lower the memory
  requirement down to 1.2 GB on 32-bit, 2.4 GB on 64-bit.)
  You should just start by downloading an official release of PyPy (with the
  JIT).

* 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://codespeak.net/pypy/trunk/pypy/doc/config/translation.gcrootfinder.html

Checksums
---------

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

  08a2c95163c95f91772abb8bf5f8b9cb  pypy-1.5-linux.tar.bz2
  32392b7986eb34cd657d5b6c5d242cc7  pypy-1.5-linux64.tar.bz2
  b1417916bc01ebb9f95c666f5e397fb5  pypy-1.5-osx64.tar.bz2
  b6cc12bed5e7243ed44aa3430eb14885  pypy-1.5-win32.zip
  cb9ada2c50666318c3a2863da1fbe487  pypy-1.5-src.tar.bz2

  b79b317f8736e9bdbf5647fe43258f722c2936f4  pypy-1.5-linux.tar.bz2
  ad3fd4d454e14514d226809fb8b1cd86455ea1b0  pypy-1.5-linux64.tar.bz2
  84922083fd5e52ff679718ea70ed5a74a5a048ad  pypy-1.5-osx64.tar.bz2
  a328dbd273c30526588496108c53c0eec7a23e98  pypy-1.5-win32.zip
  0ebcecaa4c725bf1a48272033d9f429b8a82b7e1  pypy-1.5-src.tar.bz2