Skip to content
Snippets Groups Projects
download.html 34.4 KiB
Newer Older
<!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="https://use.typekit.com/hdt8sni.js"></script>
	<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
	<script type="text/javascript" src="https://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/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="https://bitbucket.org/pypy/pypy"><img src="https://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="https://feedburner.google.com/fb/lib/images/icons/feed-icon-12x12-orange.gif" alt="Subscribe to the RSS Feed" width="14px" height="14px" /></a></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">What is PyPy?</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>
        <br />
    </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
Matti Picus's avatar
Matti Picus committed
performance improvements.</p>
<p>We provide binaries for x86, ARM, PPC and s390x running on different operating systems such as
Matti Picus's avatar
Matti Picus committed
Linux, Mac OS X and Windows (<a class="reference external" href="http://doc.pypy.org/en/latest/release-v7.1.0.html">what's new in PyPy 7.1?</a>):</p>
Matti Picus's avatar
Matti Picus committed
<ul class="simple">
Matti Picus's avatar
Matti Picus committed
<li>the Python2.7 compatible release — <strong>PyPy2.7 v7.1</strong></li>
Matti Picus's avatar
Matti Picus committed
<li>the Python3.5 compatible release — <strong>PyPy3.5 v7.0</strong></li>
Matti Picus's avatar
Matti Picus committed
<li>the Python3.6 compatible release, beta quality — <strong>PyPy3.6 v7.1</strong></li>
Armin Rigo's avatar
Armin Rigo committed
<li>the Python2.7 Software Transactional Memory special release — <strong>PyPy-STM 2.5.1</strong> (Linux x86-64 only)</li>
Matti Picus's avatar
Matti Picus committed
</ul>
<ul class="download-menu simple">
<li>Download<ul>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
<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>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
<li><a class="reference internal" href="#installing">Installing</a> (optional)</li>
<li><a class="reference internal" href="#installing-more-modules">Installing more modules</a></li>
<li><a class="reference internal" href="#installing-numpy">Installing NumPy</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>
Armin Rigo's avatar
Armin Rigo committed
<li><a class="reference internal" href="#checksums">Checksums</a></li>
<div class="section" id="jit-compiler-version">
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
<span id="default-with-a-jit-compiler"></span><h1>&ldquo;JIT Compiler&rdquo; version</h1>
<p>These binaries include a Just-in-Time compiler.  They only work on
Armin Rigo's avatar
Armin Rigo committed
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>
Matti Picus's avatar
Matti Picus committed
extensions, like <a class="reference external" href="http://pypy.readthedocs.org/en/latest/stackless.html#greenlets">greenlets</a>.</p>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
</div>
Matti Picus's avatar
Matti Picus committed
<div class="section" id="linux-binaries-and-common-distributions">
<h1>Linux binaries and common distributions</h1>
<p>Linux binaries are dynamically linked, as is usual, and thus might
not be usable due to the sad story of linux binary compatibility.  This means
that <strong>Linux binaries are only usable on the distributions written next to
them</strong> unless you're ready to hack your system by adding symlinks to the
libraries it tries to open.  There are better solutions:</p>
<ul class="simple">
<li>use Squeaky's <a class="reference external" href="https://github.com/squeaky-pl/portable-pypy#portable-pypy-distribution-for-linux">portable Linux binaries</a>.</li>
<li>or download PyPy from your release vendor (usually an outdated
Matti Picus's avatar
Matti Picus committed
version): <a class="reference external" href="http://packages.ubuntu.com/search?keywords=pypy&amp;searchon=names">Ubuntu</a> (<a class="reference external" href="https://launchpad.net/~pypy/+archive/ppa">PPA</a>), <a class="reference external" href="http://packages.debian.org/sid/pypy">Debian</a>, <a class="reference external" href="https://github.com/Homebrew/homebrew-core/blob/master/Formula/pypy.rb">Homebrew</a>, MacPorts,
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
<a class="reference external" href="http://fedoraproject.org/wiki/Features/PyPyStack">Fedora</a>, <a class="reference external" href="http://packages.gentoo.org/package/dev-python/pypy">Gentoo</a> and <a class="reference external" href="https://wiki.archlinux.org/index.php/PyPy">Arch</a> are known to package PyPy, with various
degrees of being up-to-date.</li>
<li>or <a class="reference internal" href="#translate">translate</a> your own PyPy.</li>
Matti Picus's avatar
Matti Picus committed
</div>
Matti Picus's avatar
Matti Picus committed
<div class="section" id="python2-7-compatible-pypy-7-1">
<span id="release"></span><h1>Python2.7 compatible PyPy 7.1</h1>
<ul class="download-menu simple">
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-linux32.tar.bz2">Linux x86 binary (32bit, built on Ubuntu 16.04)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-linux64.tar.bz2">Linux x86-64 binary (64bit, built on Ubuntu 16.04)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
Matti Picus's avatar
Matti Picus committed
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-osx64.tar.bz2">Mac OS X binary (64bit)</a></li>
<li>FreeBSD x86 and x86_64: see <a class="reference external" href="http://www.freshports.org/lang/pypy">FreshPorts</a></li>
Matti Picus's avatar
Matti Picus committed
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-win32.zip">Windows binary (32bit)</a> (you might need the VS 2008 runtime library
installer <a class="reference external" href="http://www.microsoft.com/en-us/download/details.aspx?id=5582">vcredist_x86.exe</a>.)</li>
Matti Picus's avatar
Matti Picus committed
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-ppc64.tar.bz2">PowerPC PPC64 Linux binary (64bit big-endian, Fedora 20)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-ppc64le.tar.bz2">PowerPC PPC64le Linux binary (64bit little-endian, Fedora 21)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-s390x.tar.bz2">s390x Linux binary (built on Redhat Linux 7.2)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-src.tar.bz2">Source (tar.bz2)</a>; <a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-src.zip">Source (zip)</a>.  See below for more about the sources.</li>
Philip Jenvey's avatar
Philip Jenvey committed
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads">All our downloads,</a> including previous versions.  We also have a
<a class="reference external" href="http://buildbot.pypy.org/mirror/">mirror</a>, but please use only if you have troubles accessing the links above</li>
Matti Picus's avatar
Matti Picus committed
</ul>
</div>
Matti Picus's avatar
Matti Picus committed
<div class="section" id="python-3-5-3-compatible-pypy3-5-v7-0-0">
<h1>Python 3.5.3 compatible PyPy3.5 v7.0.0</h1>
Julian Berman's avatar
Julian Berman committed
<ul class="download-menu simple">
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-linux32.tar.bz2">Linux x86 binary (32bit, built on Ubuntu 16.04)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-linux64.tar.bz2">Linux x86-64 binary (64bit, built on Ubuntu 16.04)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-osx64.tar.bz2">Mac OS X binary (64bit)</a> (High Sierra &gt;= 10.13, not for Sierra and below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-win32.zip">Windows binary (32bit)</a> <strong>BETA</strong></li>
Armin Rigo's avatar
Armin Rigo committed
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-ppc64.tar.bz2">PowerPC PPC64 Linux binary (64bit big-endian, Fedora 20)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-ppc64le.tar.bz2">PowerPC PPC64le Linux binary (64bit little-endian, Fedora 21)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-s390x.tar.bz2">s390x Linux binary (built on Redhat Linux 7.2)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-src.tar.bz2">Source (tar.bz2)</a>; <a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-src.zip">Source (zip)</a>.  See below for more about the sources.</li>
Philip Jenvey's avatar
Philip Jenvey committed
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads">All our downloads,</a> including previous versions.  We also have a
<a class="reference external" href="http://buildbot.pypy.org/mirror/">mirror</a>, but please use only if you have troubles accessing the links above</li>
</div>
<div class="section" id="python-3-6-compatible-pypy3-6-v7-1-0-beta">
<h1>Python 3.6 compatible PyPy3.6 v7.1.0-beta</h1>
<ul class="download-menu simple">
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.0-linux64.tar.bz2">Linux x86-64 binary (64bit, built on Ubuntu 16.04)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.0-linux32.tar.bz2">Linux x86 binary (32bit, built on Ubuntu 16.04)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.0-osx64.tar.bz2">Mac OS X binary (64bit)</a> (High Sierra &gt;= 10.13, not for Sierra and below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.0-win32.zip">Windows binary (32bit)</a></li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.0-s390x.tar.bz2">s390x Linux binary (built on Redhat Linux 7.2)</a> (see <tt class="docutils literal">[1]</tt> below)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.0-src.tar.bz2">Source (tar.bz2)</a>; <a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.0-src.zip">Source (zip)</a>.  See below for more about the sources.</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads">All our downloads,</a> including previous versions.  We also have a
<a class="reference external" href="http://buildbot.pypy.org/mirror/">mirror</a>, but please use only if you have troubles accessing the links above</li>
</ul>
<p>If your CPU is really, really old, it may be a x86-32 without SSE2.
There is untested support for manually translating PyPy's JIT without
SSE2 (<tt class="docutils literal"><span class="pre">--jit-backend=x86-without-sse2</span></tt>) but note that your machine
is probably low-spec enough that running CPython on it is a better
idea in the first place.</p>
<p><tt class="docutils literal">[1]:</tt> stating it again: the Linux binaries are provided for the
distributions listed here.  <strong>If your distribution is not exactly this
Matti Picus's avatar
Matti Picus committed
one, it won't work,</strong> you will probably see: <tt class="docutils literal">pypy: error while loading shared
libraries: &#8230;</tt>.  Unless you want to hack a lot, try out the
<a class="reference external" href="https://github.com/squeaky-pl/portable-pypy#portable-pypy-distribution-for-linux">portable Linux binaries</a>.</p>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
</div>
Armin Rigo's avatar
Armin Rigo committed
<div class="section" id="pypy-stm-2-5-1">
<h1>PyPy-STM 2.5.1</h1>
<p>This is a special version of PyPy!  See the <a class="reference external" href="http://doc.pypy.org/en/latest/stm.html">Software Transactional
Memory</a> (STM) documentation.</p>
<ul class="simple">
Philip Jenvey's avatar
Philip Jenvey committed
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-stm-2.5.1-linux64.tar.bz2">PyPy-STM Linux x86-64 binary (64bit, tar.bz2 built on Ubuntu 12.04 - 16.04)</a></li>
Armin Rigo's avatar
Armin Rigo committed
</ul>
</div>
Armin Rigo's avatar
Armin Rigo committed
<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>
Matti Picus's avatar
Matti Picus committed
<li>The most up-to-date <a class="reference external" href="http://buildbot.pypy.org/nightly/trunk/">nightly binary builds</a> with a JIT, if the official
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
release is too old for what you want to do. There are versions for
different libc on this site too.</li>
Armin Rigo's avatar
Armin Rigo committed
<li>Reverse debugger: This version enables debugging your Python
Philip Jenvey's avatar
Philip Jenvey committed
programs by going forward and backward in time.  See the <a class="reference external" href="https://bitbucket.org/pypy/revdb/">RevDB
documentation</a>.</li>
Armin Rigo's avatar
Armin Rigo committed
</ul>
<ul class="simple">
Armin Rigo's avatar
Armin Rigo committed
<li>Sandboxing: A special safe version.  Read the docs about <a class="reference external" href="features.html#sandboxing">sandboxing</a>.
This version is <strong>not supported</strong> and not actively maintained.  You
will likely have to fix some issues yourself, or checkout an old
version, or otherwise play around on your own.  We provide this
documentation only for historical reasons.  Please do not use in
production.  For reference, there are some very old, unmaintained
Philip Jenvey's avatar
Philip Jenvey committed
binaries for Linux (<a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-sandbox-linux64.tar.bz2">32bit</a>, <a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-sandbox-linux.tar.bz2">64bit</a>).</li>
<div class="section" id="installing">
<h1>Installing</h1>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
<p>All binary versions are packaged in a <tt class="docutils literal">tar.bz2</tt> or <tt class="docutils literal">zip</tt> file.  When
Armin Rigo's avatar
Armin Rigo committed
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
Matti Picus's avatar
Matti Picus committed
<tt class="docutils literal">/usr/local/bin/pypy</tt> to <tt class="docutils literal">/path/to/pypy_expanded/bin/pypy</tt>.  Do
Armin Rigo's avatar
Armin Rigo committed
not move or copy the executable <tt class="docutils literal">pypy</tt> outside the tree &ndash; put
a symlink to it, otherwise it will not find its libraries.</p>
<div class="section" id="installing-more-modules">
<h1>Installing more modules</h1>
<p>There are as yet few distribution-ready packages.
We recommend installing <tt class="docutils literal">pip</tt>, which is the standard package
manager of Python.  It works like it does on CPython as explained in the
<a class="reference external" href="http://doc.pypy.org/en/latest/install.html">installation documentation</a>.</p>
<p>If you use your distribution's PyPy package we recommend you install packages
into a virtualenv. If you try to build a module and the build process complains
about &ldquo;missing Python.h&rdquo;, you may need to install the pypy-dev package.</p>
</div>
<div class="section" id="installing-numpy">
<h1>Installing NumPy</h1>
<p><strong>There are two different versions of NumPy for PyPy.</strong> For details see this
<a class="reference external" href="http://doc.pypy.org/en/latest/faq.html#should-i-install-numpy-or-numpypy">FAQ question</a>.</p>
<div class="section" id="standard-numpy">
<h2>1. Standard NumPy</h2>
<p>Installation works on any recent PyPy (the <a class="reference internal" href="#release">release</a> above is fine).
For example, without using a virtualenv:</p>
<pre class="literal-block">
$ ./pypy-xxx/bin/pypy -m ensurepip
$ ./pypy-xxx/bin/pip install cython numpy
</pre>
<p>(See the general <a class="reference external" href="http://doc.pypy.org/en/latest/install.html">installation documentation</a> for more.)</p>
</div>
<div class="section" id="numpypy">
<h2>2. NumPyPy</h2>
Philip Jenvey's avatar
Philip Jenvey committed
<p>The &ldquo;numpy&rdquo; module can also be installed from <a class="reference external" href="https://bitbucket.org/pypy/numpy">our own repository</a> rather
than from the official source.  This version uses our
built-in <tt class="docutils literal">_numpypy</tt> multiarray replacement module, written in RPython.
This module is not complete, but if it works it should give correct answers.
Its performance is hard to predict exactly.  For regular NumPy
source code that handles large arrays, it is likely to be slower than
the standard NumPy.  It is faster on pure python code that loop over ndarrays
doing things on an element-by-element basis.</p>
<p>Installation (see the <a class="reference external" href="http://doc.pypy.org/en/latest/install.html">installation documentation</a> for installing <tt class="docutils literal">pip</tt>):</p>
pypy -m pip install git+https://bitbucket.org/pypy/numpy.git
</pre>
<p>Alternatively, the direct way:</p>
<pre class="literal-block">
git clone https://bitbucket.org/pypy/numpy.git
cd numpy
pypy setup.py install
</pre>
<p>If you installed to a system directory, you need to also run this once:</p>
<pre class="literal-block">
sudo pypy -c 'import numpy'
</pre>
<p>Note again that this version is incomplete: many things do
not work and those that do may not be any faster than NumPy on CPython.
Philip Jenvey's avatar
Philip Jenvey committed
For further instructions see <a class="reference external" href="https://bitbucket.org/pypy/numpy">the pypy/numpy repository</a> and the
<a class="reference external" href="http://doc.pypy.org/en/latest/faq.html#should-i-install-numpy-or-numpypy">FAQ question</a> about the difference between the two.</p>
<div class="section" id="building-from-source">
<span id="translate"></span><h1>Building from source</h1>
<p>(see more build <a class="reference external" href="http://pypy.readthedocs.org/en/latest/build.html">instructions</a>)</p>
Armin Rigo's avatar
Armin Rigo committed
<li><p class="first">Get the source code.  The preferred way is to checkout the current
trunk using <a class="reference external" href="https://www.mercurial-scm.org/">Mercurial</a>.  The trunk usually works and is of course
more up-to-date.  The following command should run in about 7 minutes
nowadays if you have hg &gt;= 3.7 (it is much slower with older versions):</p>
<pre class="literal-block">
hg clone https://bitbucket.org/pypy/pypy
</pre>
<p>The trunk contains PyPy 2.  For PyPy 3, switch to the correct branch:</p>
<pre class="literal-block">
# for PyPy 3: switch to the branch of PyPy that implements Python 3.5
hg update py3.5
</pre>
<p>Alternatively, get one of the following smaller packages for the source at
Armin Rigo's avatar
Armin Rigo committed
the same revision as the above binaries:</p>
Armin Rigo's avatar
Armin Rigo committed
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-src.tar.bz2">pypy2.7-v7.1.0-src.tar.bz2</a> (sources, PyPy 2 only)</li>
<li><a class="reference external" href="https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.0-src.tar.bz2">pypy3.6-v7.1.0-src.tar.bz2</a> (sources, PyPy 3 only)</li>
Philip Jenvey's avatar
Philip Jenvey committed
<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/build.html#install-build-time-dependencies">here</a>.</p>
Armin Rigo's avatar
Armin Rigo committed
</li>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
<li><p class="first">Enter the <tt class="docutils literal">goal</tt> directory:</p>
<pre class="literal-block">
Armin Rigo's avatar
Armin Rigo committed
cd pypy/pypy/goal
Armin Rigo's avatar
Armin Rigo committed
<li><p class="first">Run the <tt class="docutils literal">rpython</tt> script.  Here are the common combinations
Armin Rigo's avatar
Armin Rigo committed
of options (works also with <tt class="docutils literal">python</tt> instead of <tt class="docutils literal">pypy</tt>;
requires CPython 2.7 or PyPy 2, even to build PyPy 3):</p>
<pre class="literal-block">
Armin Rigo's avatar
Armin Rigo committed
pypy ../../rpython/bin/rpython -Ojit targetpypystandalone           # get the JIT version
pypy ../../rpython/bin/rpython -O2 targetpypystandalone             # get the no-jit version
pypy ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone   # get the sandbox version
Armin Rigo's avatar
Armin Rigo committed
</pre>
<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 about 3GB of RAM on a 32-bit system
and about 5GB on 64-bit systems.  (Do not start a translation on a
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
machine with insufficient RAM!  It will just swap forever.  See
notes below in that case.)</p>
Armin Rigo's avatar
Armin Rigo committed
</li>
<li><p class="first">If you want to install this PyPy as root, please read the next section,
<a class="reference internal" href="#packaging">Packaging</a>.</p>
Armin Rigo's avatar
Armin Rigo committed
</li>
<p>Notes:</p>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
<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
Armin Rigo's avatar
Armin Rigo committed
official release of PyPy (with the JIT).  If you really have to use CPython
then note that we are talking about CPython 2.7 here, not CPython 3.x.
(Older versions like 2.6 are out.)</p>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
</li>
<li><p class="first">On some 32-bit systems, the address space limit of 2 or 3 GB of RAM
can be an issue.  More generally you may be just a little bit low of
RAM.  First note that 2 GB is really not enough nowadays; on Windows
you first need to refer to the <a class="reference external" href="http://doc.pypy.org/en/latest/windows.html#preparing-windows-for-the-large-build">Windows build instructions</a>.  More
precisely, translation on 32-bit takes at this point 2.7 GB if PyPy is
used and 2.9 GB if CPython is used.  There are two workarounds:</p>
<p>1. use PyPy, not CPython.  If you don't have any PyPy so far, not even
an older version, then you need to build one first, with some parts
removed.  So, first translate with <tt class="docutils literal"><span class="pre">...rpython</span> <span class="pre">-Ojit</span>
targetpypystandalone <span class="pre">--withoutmod-micronumpy</span> <span class="pre">--withoutmod-cpyext</span></tt>,
then copy <tt class="docutils literal"><span class="pre">pypy-c</span></tt> and <tt class="docutils literal">libpypy_c.so</tt> somewhere else, and finally
call it with <tt class="docutils literal"><span class="pre">...pypy-c</span> <span class="pre">../../rpython/bin/rpython</span> <span class="pre">-Ojit</span></tt>.</p>
<p>2. if even using PyPy instead of CPython is not enough, try to tweak
some internal parameters.  Example (slower but saves around 400MB):</p>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
<pre class="literal-block">
PYPY_DONT_RUN_SUBPROCESS=1 PYPY_GC_MAX_DELTA=200MB pypy --jit loop_longevity=300 ../../rpython/bin/rpython -Ojit --source
# then read the next point about --source
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
</pre>
</li>
<li><p class="first">You can run translations with <tt class="docutils literal"><span class="pre">--source</span></tt>, which only builds the C
source files (and prints at the end where).  Then you can <tt class="docutils literal">cd</tt> there
and execute <tt class="docutils literal">make</tt>.  This is another way to reduce memory usage.
Note that afterwards, you have to run manually <tt class="docutils literal"><span class="pre">pypy-c</span>
<span class="pre">.../pypy/tool/build_cffi_imports.py</span></tt> if you want to be able to import
the cffi-based modules.</p>
</li>
<li><p class="first">On Linux, translating with <tt class="docutils literal">asmgcroot</tt>, is delicate.
It requires using gcc with no particularly
Armin Rigo's avatar
Armin Rigo committed
fancy options.  It does not work e.g. with clang, or if you pass uncommon
Armin Rigo's avatar
Armin Rigo committed
options with the <tt class="docutils literal">CFLAGS</tt> environment variable.  If you insist on
passing these options or using clang, then you can compile PyPy with
the default <a class="reference external" href="http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html">shadow stack</a> option instead (for a small performance price in
Armin Rigo's avatar
Armin Rigo committed
non-JITted code).</p>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
</li>
<li><p class="first">Like other JITs, PyPy doesn't work out of the box on some Linux
distributions that trade full POSIX compliance for extra security
features.  E.g. with PAX, you have to run PyPy with <tt class="docutils literal">paxctl <span class="pre">-cm</span></tt>.
This also applies to translation (unless you use CPython to run the
translation and you specify <tt class="docutils literal"><span class="pre">--source</span></tt>).</p>
</li>
<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/
Matti Picus's avatar
Matti Picus committed
python package.py --help #for information
python package.py --archive-name pypy-my-own-package-name
Armin Rigo's avatar
Armin Rigo committed
<p>It is recommended to use package.py because custom scripts will
invariably become out-of-date.  If you want to write custom scripts
anyway, note an easy-to-miss point: some modules are written with CFFI,
and require some compilation.  If you install PyPy as root without
pre-compiling them, normal users will get errors:</p>
<ul class="simple">
<li>PyPy 2.5.1 or earlier: normal users would see permission errors.
Installers need to run <tt class="docutils literal">pypy <span class="pre">-c</span> &ldquo;import gdbm&rdquo;</tt> and other similar
commands at install time; the exact list is in <a class="reference external" href="https://bitbucket.org/pypy/pypy/src/default/pypy/tool/release/package.py">package.py</a>.  Users
seeing a broken installation of PyPy can fix it after-the-fact if they
have sudo rights, by running once e.g. <tt class="docutils literal">sudo pypy <span class="pre">-c</span> &quot;import gdbm</tt>.</li>
<li>PyPy 2.6 and later: anyone would get <tt class="docutils literal">ImportError: no module named
_gdbm_cffi</tt>.  Installers need to run <tt class="docutils literal">pypy _gdbm_build.py</tt> in the
<tt class="docutils literal">lib_pypy</tt> directory during the installation process (plus others;
see the exact list in <a class="reference external" href="https://bitbucket.org/pypy/pypy/src/default/pypy/tool/release/package.py">package.py</a>).  Users seeing a broken
installation of PyPy can fix it after-the-fact, by running <tt class="docutils literal">pypy
/path/to/lib_pypy/_gdbm_build.py</tt>.  This command produces a file
called <tt class="docutils literal"><span class="pre">_gdbm_cffi.pypy-41.so</span></tt> locally, which is a C extension
module for PyPy.  You can move it at any place where modules are
normally found: e.g. in your project's main directory, or in a
directory that you add to the env var <tt class="docutils literal">PYTHONPATH</tt>.</li>
</ul>
Maciej Fijalkowski's avatar
Maciej Fijalkowski committed
<div class="section" id="checksums">
<h1>Checksums</h1>
Matti Picus's avatar
Matti Picus committed
<p>Here are the checksums for each of the downloads of PyPy 7.1.0, 7.0.0 and 6.0.0.</p>
<p>pypy2.7-7.1.0 sha256:</p>
<pre class="literal-block">
44ec91e8cb01caab289d8763c203f3aaf288d14325a6c42692bd1ac4e870d758  pypy2.7-v7.1.0-linux32.tar.bz2
fef176a29a2ef068c00c8098e59dab935ca6e956f089672b3f7351da95a034f5  pypy2.7-v7.1.0-linux64.tar.bz2
8be43685ce718b0768387450fc6dc395d60809b778b6146c353ef67826022153  pypy2.7-v7.1.0-osx64.tar.bz2
b065f55741bcb37863f1eca30ce91c9d79159371a6994100930cdc2ede3237bc  pypy2.7-v7.1.0-s390x.tar.bz2
b051a71ea5b4fa27d0a744b28e6054661adfce8904dcc82500716b5edff5ce4b  pypy2.7-v7.1.0-src.tar.bz2
e60ce30f9947844da43daaa7658adc0c05330681305225954114772f42df06ec  pypy2.7-v7.1.0-src.zip
76658c9ad679d562b8b6a09d006caa666406337b9834ff56db16980c5e549f20  pypy2.7-v7.1.0-win32.zip
</pre>
<p>pypy 3.6-v7.1.0 sha256:</p>
<pre class="literal-block">
6e1fd6a820c8ba850761b052a1e53c2138d2a46d221202dd010815d7c9723269  pypy3.6-v7.1.0-linux32.tar.bz2
853ab874ae3b1f929576890c511f3efbc9159c2a16332113e68be7dccc51e2aa  pypy3.6-v7.1.0-linux64.tar.bz2
84f8fb41aa7ec6e3f72546d1ea1d412f7ef51edf039074610295c59cc0ff1e35  pypy3.6-v7.1.0-osx64.tar.bz2
9ebc7bee180432991dd8a2f15d320120cf99ef1a315e764e9ba6ff4b969819b8  pypy3.6-v7.1.0-s390x.tar.bz2
3e3091798cff9e7b6de35f7aa7f71965e06dcbf35112eba202d4ded7675f95f4  pypy3.6-v7.1.0-src.tar.bz2
e156b8cf13feae37bc4a8ea95d137c0422255188137279085917e65ec0b5731a  pypy3.6-v7.1.0-src.zip
1383497f89e034e4124ea3e65979b0701b0296c06f4fec7082c8a39014a821f0  pypy3.6-v7.1.0-win32.zip
</pre>
Matti Picus's avatar
Matti Picus committed
<p>pypy2.7-7.0.0 sha256:</p>
<pre class="literal-block">
446fc208dd77a0048368da830564e6e4180bcd786e524b5369c61785af5c903a  pypy2.7-v7.0.0-linux32.tar.bz2
971b1909f9fe960c4c643a6940d3f8a60d9a7a2937119535ab0cfaf83498ecd7  pypy2.7-v7.0.0-linux64.tar.bz2
e7ecb029d9c7a59388838fc4820a50a2f5bee6536010031060e3dfa882730dc8  pypy2.7-v7.0.0-osx64.tar.bz2
2ce390d93fa57ba912066a8b6439588bd9cf6aa9cef44d892b8e3e6dba64615e  pypy2.7-v7.0.0-s390x.tar.bz2
04477a41194240cd71e485c3f41dec35a787d1b3bc030f9aa59e5e81bcf4118b  pypy2.7-v7.0.0-win32.zip
165ffdf49a04c3ebdc966f76e67dd1767ad699657215dd83ca6996ab8ed87f52  pypy2.7-v7.0.0-ppc64.tar.bz2
cfb0e2e9b1434e94ea559548c7486c8e7b4319a397309e8ed3783d9beadf1c6c  pypy2.7-v7.0.0-ppc64le.tar.bz2
f51d8bbfc4e73a8a01820b7871a45d13c59f1399822cdf8a19388c69eb20c18c  pypy2.7-v7.0.0-src.tar.bz2
77c8c02cf412a5f8182ffe8845877cffa506e5a5ce3a7cd835483fdc1202afd4  pypy2.7-v7.0.0-src.zip
</pre>
<p>pypy 3.5-v7.0.0 sha256:</p>
<pre class="literal-block">
Matti Picus's avatar
Matti Picus committed
b8db8fbca9621de8ea8cd7184b322f2dddb2f385e8e5a63dfb75bb3fea4b2e3f  pypy3.5-v7.0.0-linux32.tar.bz2
729e3c54325969c98bd3658c6342b9f5987b96bad1d6def04250a08401b54c4b  pypy3.5-v7.0.0-linux64.tar.bz2
7c6d71653d9b1a7946d1eeebbf24b454fe934fba8b0c39f648bdc545fb2895ce  pypy3.5-v7.0.0-osx64.tar.bz2
d588b045cc0d3a75c31fce54c1d181b1206ad9a5dd272fe79160a6268401605f  pypy3.5-v7.0.0-s390x.tar.bz2
23e30b00ab61f24578059e4643fbf0221982faffd874898b5737fc5b334ca0ab  pypy3.5-v7.0.0-ppc64.tar.bz2
2912884da05abc2cdf71dd337c3f280095351312c1a1732a52b6878174a0fd02  pypy3.5-v7.0.0-ppc64le.tar.bz2
TODO win32
b2ddb0f45cb4e0384fb498ef7fcca2ac96c730b9000affcf8d730169397f017f  pypy3.5-v7.0.0-src.tar.bz2
3aa3a921c163667761165dbd2070e56d6715979fe9cc1f135d58ea0692a05a1e  pypy3.5-v7.0.0-src.zip
</pre>
<p>pypy 3.6-v7.0.0-alpha sha256:</p>
<pre class="literal-block">
8576bde0760c239040706cf4952995eb0e77938b175885392a465a0d1616173d  pypy3.6-v7.0.0-linux64.tar.bz2
4a95ffd61fd2d626a9c099db6e44889c2a7eecee9cb1cbc29e06603c218ba8e2  pypy3.6-v7.0.0-osx64.tar.bz2
645d81472d16922fd592e9261da449cb19847ff7d5eaa89bcf05d9214b6b2698  pypy3.6-v7.0.0-win32.zip
7ccbf81db5c647fa0c27636c7d18d059d2570fff7eaffc03857c67bee84b8a26  pypy3.6-v7.0.0-src.tar.bz2
867dce40a63caccde161d90a0792e69f2a510a1f3147b694731052be52fafe5c  pypy3.6-v7.0.0-src.zip
</pre>
Matti Picus's avatar
Matti Picus committed
<p>pypy2.7-6.0.0 sha256:</p>
<pre class="literal-block">
ad1082d4328ae8f32617b14628648583b82b6d29df3aa42b97bd1853c08c4bc8  pypy2-v6.0.0-linux32.tar.bz2
6cbf942ba7c90f504d8d6a2e45d4244e3bf146c8722d64e9410b85eac6b5af67  pypy2-v6.0.0-linux64.tar.bz2
924ca3f90aa28e8961859508c25752c95253b842318a0f267267ffe90f56a916  pypy2-v6.0.0-linux-armel.tar.bz2
6506ce739e31981e5596d3cc2e2c7f5b086ee77bb4d97773082b62b2f283eef2  pypy2-v6.0.0-linux-armhf-raspbian.tar.bz2
d7dc443e6bb9a45212e8d8f5a63e9f6ce23f1d88c50709efea1c75b76c8bc186  pypy2-v6.0.0-osx64.tar.bz2
bf155c8ac2f757d24361591080a9f4f95424a07e30f943f7d751d96442e0f36a  pypy2-v6.0.0-s390x.tar.bz2
6097ec5ee23d0d34d8cd27a1072bed041c8a080ad48731190a03a2223029212d  pypy2-v6.0.0-src.tar.bz2
3553b19447cdb627919cc37d76979e15dc755b085e979f5ffa9b25933ec343b3  pypy2-v6.0.0-src.zip
6e2210dae1ae721ed4eb9cba19f15453514b64111511c84f24843c4fdefdaf7f  pypy2-v6.0.0-win32.zip
</pre>
<p>pypy 3.5-v6.0.0 sha256:</p>
<pre class="literal-block">
b04eeee5160e6cb5f8962de80f077ea1dc7be34e77d74bf075519c23603f5ff9  pypy3-v6.0.0-linux32.tar.bz2
4cfffa292b9ef34bb6ba39cdbaa196c5c5cbbc5aa3faaa157cf45d7e34027048  pypy3-v6.0.0-linux64.tar.bz2
6a6888a55192f58594838b8b3d2e7daaad43d3bf4293afab3dd8987d0bbd1124  pypy3-v6.0.0-linux-armel.tar.bz2
8a0420dda23413925400538bbfc0cff2bbb2ab0de984eef6faaeab6d3309cbcc  pypy3-v6.0.0-linux-armhf-raspbian.tar.bz2
938b8034e30f5f5060d2a079070c56c3be5559bc7ae9cc0c8395fe6fc45cfe4c  pypy3-v6.0.0-osx64.tar.bz2
f0a3097cf74d6b1fb3ae2a060384e72b7868ca76cd04584336b417e9982ec0a5  pypy3-v6.0.0-s390x.tar.bz2
ed8005202b46d6fc6831df1d13a4613bc40084bfa42f275068edadf8954034a3  pypy3-v6.0.0-src.tar.bz2
8cd3cc2ef362e774edf9c7a6b79dbe42fff75217c5ed96b235a0a792e4421dc4  pypy3-v6.0.0-src.zip
72dddb3746a51f7672c77d619c818e27efe899e08ae82762448e50dbfdc2f5f3  pypy3-v6.0.0-win32.zip
</pre>
fijal's avatar
fijal committed
</div>
</div>
<div id="sidebar">
</div>
</div>
</div>
</div></div></div>
</body>