<!DOCTYPE html> <html> <head> <title>PyPy :: Download and install</title> <meta http-equiv="content-language" content="en" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="author" content="PyPy Team" /> <meta name="description" content="PyPy" /> <meta name="copyright" content="MIT" /> <meta name="document-rating" content="general" /> <link rel="stylesheet" type="text/css" media="screen" title="default" href="css/site.css" /> <link rel="alternate" type="application/rss+xml" title="RSS Feed for PyPy" href="http://feeds.feedburner.com/PyPyStatusBlog" /> <link rel="stylesheet" type="text/css" href="css/jquery-ui-1.8.14.custom.css" /> <script type="text/javascript" src="http://use.typekit.com/hdt8sni.js"></script> <script type="text/javascript">try{Typekit.load();}catch(e){}</script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script> <script type="text/javascript" src="js/detect.js"></script> <script type="text/javascript" src="js/script2.js?bust=1"></script> </head> <body> <script type="text/javascript"> var _gaq = [['_setAccount', 'UA-7778406-3'], ['_trackPageview']]; if (document.location.protocol !== 'file:') { (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga); })(); } </script> <div id="body-outer"><div id="body-inner"><div id="body" class="clearfix"> <div id="header"> <div id="menu-follow"> <div><a href="http://search.twitter.com/search?q=%23pypy" title="Follow the conversation on Twitter"><img src="http://static.ampify.it/icon.twitter.gif" alt="Follow the conversation on Twitter" width="14px" height="14px" /></a></div> <div><a href="https://bitbucket.org/pypy/pypy"><img src="http://www.selenic.com/hg-logo/logo-droplets-25.png" width="14px" height="14px" /></a></div> <div><a href="http://feeds.feedburner.com/PyPyStatusBlog" title="Subscribe to the RSS Feed"><img src="http://static.ampify.it/icon.rss.png" alt="Subscribe to the RSS Feed" width="14px" height="14px" /></a></div> </div> <div id="logo"><a href="http://pypy.org"><img src="image/pypy-logo.png" alt="PyPy" height="110px" /></a></div> <hr class="clear-left" /> <div id="menu-sub"><a href="index.html">Home</a><span class="menu-sub-sep"> | </span><a href="features.html">Features</a><span class="menu-sub-sep"> | </span><a href="download.html">Download</a><span class="menu-sub-sep"> | </span><a href="compat.html">Compatibility</a><span class="menu-sub-sep"> | </span><a href="performance.html">Performance</a><span class="menu-sub-sep"> | </span><a href="http://doc.pypy.org">Dev Documentation</a><span class="menu-sub-sep"> | </span><a href="http://morepypy.blogspot.com">Blog</a><span class="menu-sub-sep"> | </span><a href="people.html">People</a><span class="menu-sub-sep"> | </span><a href="contact.html">Contact</a><span class="menu-sub-sep"> | </span><a href="py3donate.html">Py3k donations</a><span class="menu-sub-sep"> | </span><a href="numpydonate.html">NumPy donations</a><span class="menu-sub-sep"> | </span><a href="tmdonate.html">STM/AME donations</a></div> <hr class="clear" /> </div> <div id="content"> <div> <div id="main"> <h1 class="title">Download and install</h1> <p class="download-menu">There are <a class="reference external" href="http://buildbot.pypy.org/nightly/trunk/">nightly binary builds</a> available. Those builds are not always as stable as the release, but they contain numerous bugfixes and performance improvements.</p> <p>Here are the binaries of the current release — <strong>PyPy 2.0 beta1</strong> — (<a class="reference external" href="http://doc.pypy.org/en/latest/release-2.0.0-beta1.html">what's new in PyPy 2.0 beta1?</a>) for x86 Linux, Mac OS/X, Windows or ARM linux.</p> <p>You can also find here the older 1.9 release.</p> <ul class="download-menu simple"> <li>Download<ul> <li><a class="reference internal" href="#default-with-a-jit-compiler">Default (with a JIT Compiler)</a></li> <li><a class="reference internal" href="#other-versions">Other versions</a></li> </ul> </li> <li><a class="reference internal" href="#installing">Installing</a> (optional)</li> <li><a class="reference internal" href="#building-from-source">Building from source</a></li> <li><a class="reference internal" href="#packaging">Packaging</a></li> <li><a class="reference internal" href="#checksums">Checksums</a></li> </ul> <div class="section" id="jit-compiler-version"> <span id="default-with-a-jit-compiler"></span><h1>“JIT Compiler” version</h1> <p>These binaries include a Just-in-Time compiler. They only work on x86 CPUs that have the <a class="reference external" href="http://en.wikipedia.org/wiki/SSE2">SSE2</a> instruction set (most of them do, nowadays), or on x86-64 CPUs. They also contain <a class="reference external" href="http://www.stackless.com/">stackless</a> extensions, like <a class="reference external" href="http://codespeak.net/svn/greenlet/trunk/doc/greenlet.txt">greenlets</a>. (This is the official release 2.0 beta1 and 1.9; for the most up-to-date version see below.)</p> </div> <div class="section" id="beta1"> <h1>2.0 beta1</h1> <ul class="simple"> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-linux.tar.bz2">Linux binary (32bit)</a></li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-linux64-libc2.15.tar.bz2">Linux binary (64bit) (libc 2.15)</a></li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-linux64-libc2.13.tar.bz2">Linux binary (64bit) (libc 2.13)</a></li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-linux-armel.tar.bz2">Linux ARM binary</a></li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-osx64.tar.bz2">Mac OS/X binary (64bit)</a></li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1.1-win32.zip">Windows binary (32bit)</a> (you need the <a class="reference external" href="http://www.microsoft.com/en-us/download/details.aspx?id=5582">VS 2008 runtime library installer vcredist_x86.exe</a>. <em>Updated again:</em> the previous version required two runtime libs)</li> </ul> </div> <div class="section" id="id7"> <h1>1.9</h1> <ul class="simple"> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux.tar.bz2">Linux binary (32bit)</a></li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux64.tar.bz2">Linux binary (64bit)</a></li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-osx64.tar.bz2">Mac OS/X binary (64bit)</a></li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-win32.zip">Windows binary (32bit)</a> (you may need the <a class="reference external" href="http://www.microsoft.com/en-us/download/details.aspx?id=5582">VS 2008 runtime library installer vcredist_x86.exe</a>)</li> </ul> <p>If your CPU is really old, it may not have SSE2. In this case, you need to <a class="reference internal" href="#translate">translate</a> yourself with the option <tt class="docutils literal"><span class="pre">--jit-backend=x86-without-sse2</span></tt>.</p> </div> <div class="section" id="other-versions"> <span id="other-versions-without-a-jit"></span><h1>Other versions</h1> <p>The other versions of PyPy are:</p> <ul class="simple"> <li>The most up-to-date <a class="reference external" href="http://buildbot.pypy.org/nightly/trunk/">nightly build</a> with a JIT, if the official release is too old for what you want to do. If the nightly build does not work for you, you might have more luck using <a class="reference external" href="http://baroquesoftware.com/nightlies/">alternative nightly build</a>, however linux binary distribution is hard.</li> <li>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 <tt class="docutils literal">pypy <span class="pre">--jit</span> off</tt>.)</li> <li>Sandboxing: A special safe version. Read the docs about <a class="reference external" href="features.html#sandboxing">sandboxing</a>. (It is also possible to <a class="reference internal" href="#translate">translate</a> 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.) <strong>Note that the sandboxed binary needs a full pypy checkout to work</strong>. Consult the <a class="reference external" href="http://doc.pypy.org/en/latest/sandbox.html">sandbox docs</a> for details<ul> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-sandbox-linux64.tar.bz2">Linux binary (64bit)</a></li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-sandbox-linux.tar.bz2">Linux binary (32bit)</a></li> </ul> </li> </ul> <p>These versions are not officially part of the releases, which focuses on the JIT. You can find prebuilt binaries for them on our <a class="reference external" href="http://buildbot.pypy.org/nightly/trunk/">nightly build</a>, or <a class="reference internal" href="#translate">translate</a> them yourself.</p> </div> <div class="section" id="installing"> <h1>Installing</h1> <p>All binary versions are packaged in a <tt class="docutils literal">tar.bz2</tt> or <tt class="docutils literal">zip</tt> file. When uncompressed, they run in-place. For now you can uncompress them either somewhere in your home directory or, say, in <tt class="docutils literal">/opt</tt>, and if you want, put a symlink from somewhere like <tt class="docutils literal">/usr/local/bin/pypy</tt> to <tt class="docutils literal"><span class="pre">/path/to/pypy-2.0/bin/pypy</span></tt>. Do not move or copy the executable <tt class="docutils literal">pypy</tt> outside the tree – put a symlink to it, otherwise it will not find its libraries.</p> </div> <div class="section" id="building-from-source"> <span id="translate"></span><h1>Building from source</h1> <ol class="arabic"> <li><p class="first">Get the source code. The following packages contain the source at the same revision as the above binaries:</p> <ul class="simple"> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/get/release-2.0-beta-1.tar.bz2">pypy-2.0b1-src.tar.bz2</a> (sources, Unix line endings)</li> <li><a class="reference external" href="https://bitbucket.org/pypy/pypy/get/release-2.0-beta-1.zip">pypy-2.0b1-src.zip</a> (sources, Unix line endings too, sorry)</li> </ul> <p>Or you can checkout the current trunk using <a class="reference external" href="http://mercurial.selenic.com/">Mercurial</a> (the trunk usually works and is of course more up-to-date):</p> <pre class="literal-block"> hg clone https://bitbucket.org/pypy/pypy </pre> </li> <li><p class="first">Make sure you <strong>installed the dependencies.</strong> See the list <a class="reference external" href="http://pypy.readthedocs.org/en/latest/getting-started-python.html#translating-the-pypy-python-interpreter">here</a>.</p> </li> <li><p class="first">Enter the <tt class="docutils literal">goal</tt> directory:</p> <pre class="literal-block"> cd pypy/pypy/translator/goal # release 2.0-beta-1 cd pypy/pypy/goal # current trunk </pre> </li> <li><p class="first">Run the <tt class="docutils literal">translate.py</tt> script (called <tt class="docutils literal">rpython.py</tt> in the current trunk). Here are the common combinations of options (works also with <tt class="docutils literal">python</tt> instead of <tt class="docutils literal">pypy</tt>):</p> <pre class="literal-block"> 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 </pre> <p>Or with the current trunk:</p> <pre class="literal-block"> ../../rpython/bin/rpython -Ojit # or -O2, etc. </pre> </li> <li><p class="first">Enjoy Mandelbrot <tt class="docutils literal"><span class="pre">:-)</span></tt> 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.)</p> </li> </ol> <p>Notes:</p> <ul> <li><p class="first">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.</p> </li> <li><p class="first">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.</p> <pre class="literal-block"> PYPY_GC_MAX_DELTA=200MB pypy --jit loop_longevity=300 ./translate.py -Ojit </pre> </li> <li><p class="first">Because of <tt class="docutils literal">asmgcroot</tt>, 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 <tt class="docutils literal">CFLAGS</tt> environment variable. You can also try to compile PyPy with the <a class="reference external" href="http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html">shadow stack</a> option.</p> </li> </ul> </div> <div class="section" id="packaging"> <h1>Packaging</h1> <p>Once PyPy is translated from source the binary package similar to those provided in the section <a class="reference internal" href="#default-with-a-jit-compiler">Default (with a JIT Compiler)</a> above could be easily created with <tt class="docutils literal">package.py</tt> script as following:</p> <pre class="literal-block"> cd ./pypy/pypy/tool/release/ python package.py ../../.. pypy-my-own-package-name </pre> </div> <div class="section" id="checksums"> <h1>Checksums</h1> <p>Here are the checksums for each of the downloads (md5 and sha1):</p> <pre class="literal-block"> 68d8668299cd5adf4f302eaf882c5b33 pypy-2.0-beta1-linux64-libc2.13.tar.bz2 0fde559a7b1a3b98245d6a5ea7f8ebb2 pypy-2.0-beta1-linux64-libc2.15.tar.bz2 a1505520c063c591b218e5cd3436b111 pypy-2.0-beta1-linux-armel.tar.bz2 5aa2e4eee1c3dab86e5cec237776ced3 pypy-2.0-beta1-linux.tar.bz2 2802a06cd19ac86930b63afdd837c32f pypy-2.0-beta1-osx64.tar.bz2 a34dcd53537aaba0bed69d47f492ac73 pypy-2.0-beta1.1-win32.zip 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 4a346df59983e4a5c50e8ee211f80619 release-2.0-beta-1.tar.bz2 (source) 60270f1b919e75f818028da52ab8c3d3 release-2.0-beta-1.zip (source) 720da40e127b6438d6d3ab1164dbf596479984a0 pypy-2.0-beta1-linux64-libc2.13.tar.bz2 a406b8b0f8e44c4f3bea0476307c0329a3fde9c2 pypy-2.0-beta1-linux64-libc2.15.tar.bz2 5682358c775e90dbc3636dbb0f6158675ecf5357 pypy-2.0-beta1-linux-armel.tar.bz2 ede5788f282072bc410019fb26c732f55f0b33ff pypy-2.0-beta1-linux.tar.bz2 e4938fdf33072e457fee6cb22798ec08b5a01978 pypy-2.0-beta1-osx64.tar.bz2 152ab10da55ed9f8c8a21b5cb4e67ee2ff4005fa pypy-2.0-beta1.1-win32.zip 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 281439ca2fb56edfe26fc65f99ab6eb238097425 release-2.0-beta-1.tar.bz2 (source) a2fc9b8031b5817ccd4389d97e3d8c480b48eb78 release-2.0-beta-1.zip (source) </pre> </div> </div> <div id="sidebar"> </div> </div> </div> </div></div></div> </body> </html>