Download and install

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

The release 1.2 of PyPy supports Python version 2.5. If you are interested in helping with 2.6, 2.7 or 3.x features, contact us!

“JIT Compiler” version

These binaries include a Just-in-Time compiler. They only work on 32-bit x86 (IA-32) CPUs that have the SSE2 instruction set (most of them do, nowadays), as well as on any x86-64 machine in the 32-bit compatibility mode.

  • Linux binary
  • Mac OS/X binary
  • Windows binary (this version is alpha software!)

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.

If your CPU is a 64-bit machine and you want to translate a 32-bit version of PyPy yourself, here are hints.

If you want to help us with implementing the 64-bit JIT backend, contact us!

“No JIT” version

WARNING! Unless you really want to try this out, we recommend the JIT version.

This version still has a few advantages over the JIT Compiler version. Notably, for Python programs that require large amounts of memory (at least a few hundred MBs), the following version of pypy-c runs them by requiring generally 1.5x or 2x less memory than CPython. These binaries work on 32-bit x86 (IA-32) CPUs as well as x86-64 CPUs in the 32-bit compatibility mode.

  • Linux binary
  • Mac OS/X binary
  • Windows binary

If your CPU is a 64-bit machine and you want to translate a 32-bit version of PyPy yourself, here are hints.

If you want to help us with finishing the implementation of the native 64-bit version (there are a few known issues, like missing code in ctypes to implement calls to C functions), contact us or donate money!

“Sandbox” version

A special safe version. Read the docs about sandboxing. These binaries work on 32-bit x86 (IA-32) CPUs as well as x86-64 CPUs in the 32-bit compatibility mode.

  • Linux binary
  • Mac OS/X binary
  • Windows binary

It is also possible to translate a version that includes both sandboxing and the JIT compiler, although as the JIT is relatively complicated, this reduce a bit the level of confidence we can put in it.

If your CPU is a 64-bit machine and you want to translate a 32-bit version of PyPy yourself, here are hints.

The native 64-bit version needs testing and careful reviewing; contact us!

“Stackless” version

Provides Stackless extensions, as well as greenlets. These binaries work on 32-bit x86 (IA-32) CPUs as well as x86-64 CPUs in the 32-bit compatibility mode.

  • Linux binary
  • Mac OS/X binary
  • Windows binary

It is not possible right now to combine Stackless features with the JIT.

If your CPU is a 64-bit machine and you want to translate a 32-bit version of PyPy yourself, here are hints.

For the native 64-bit version, see the issues of the no jit version..

Building from source

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

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

    svn co http://codespeak.net/svn/pypy/trunk pypy-dist
    
  2. Enter the goal directory:

    cd pypy-dist/pypy/translator/goal
    
  3. Run the translate.py script. Here are the common combinations of options:

    python translate.py -Ojit                # get the JIT version
    python translate.py -O2                  # get the no-jit version
    python translate.py --sandbox            # get the sandbox version
    python translate.py --stackless          # get the stackless version
    python translate.py -Ojit --backend=cli  # only for branch/cli-jit
    
  4. Enjoy Mandelbrot :-) It takes on the order of one hour to finish the translation, and 1.3 GB of RAM on a 32-bit system. (Do not start a translation on a machine with 1GB or less!)

Note on building a 32-bit version on 64-bit systems

To build 32-bit versions of pypy-c you need to run translate.py in a 32-bit version of Python. You can check with:

$ python
Python 2.6.2 (...)
>>> import sys
>>> sys.maxint

This prints 9223372036854775807 in 64-bit versions and 2147483647 in 32-bit versions.

On Linux, you may have to compile yourself a 32-bit Python, e.g.:

cd Python-2.6.4
CC="gcc -m32" LDFLAGS="-L/lib32 -L/usr/lib32 \
  -L`pwd`/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" \
  ./configure
make
# and then use this ./python to run translate.py

On Mac OS/X: the easiest is to systematically use Python 2.5 when working with PyPy. Indeed, the standard Python 2.5 runs in 32-bit mode.

On Windows, I only know about the solution of installing a 32-bit Python manually.