Easy install PyPy3

PyPy:

  • allows running Python code up to multiple times faster.
  • particularly suited for heavy “pure Python” workloads.
  • does not significantly help for workloads heavy in Numpy array operations, for example.
  • slower to start, so if a program isn’t “big enough”, PyPy can be slower than standard CPython.
  • available for Linux, macOS and Windows.
  1. download and extract PyPy3 for your operating system.
  2. add the pypy3 directory containing the PyPy3 executable to your PATH and reopen Terminal

Install/upgrade Pip so that you can install other packages:

pypy3 -m ensurepip

pypy3 -m pip install --upgrade pip setuptools wheel

Many PyPI packages can be installed with pip as usual. On Windows, the appropriate version of Microsoft Visual Studio may be required to compile packages from source.

pypy3 -m pip install numpy

Some packages don’t work yet easily, particularly on Windows where the compilers and prerequisite libraries may need to be manually built.