Skip to content
Easily install PyPy in a virtualenv without touching CPython.
Latest commit 624aa54 Feb 14, 2013 @boronine Merge pull request #7 from mktums/master
Update to PyPy 1.9


(The most proper way of making a PyPy virtualenv is described here)

With this script you can easily install PyPy in a virtualenv side by side with CPython (they will share site-packages), it is useful if you want to experiment with PyPy without having to set up a dedicated virtualenv. There is one gotcha pointed out by Antonio Cuni: you won't be able to run CPython's C extensions with PyPy (this gotcha does not apply to the standard library, since it will not be shared).

This script supports Linux and (experimentally) OS X.

source myenv/bin/activate
easy_install pypyenv
pypyenv install         # Tries to install PyPy with JIT
pypyenv uninstall       # Uninstalls PyPy from virtualenv

pypyenv will create a pypy executable in your virtualenv's bin folder, but will not change your current python executable by default. If you want to use PyPy exclusively in your virtualenv, do the following:

cd path/to/my/env
cd bin
mv python python.bak
ln -s pypy python

Good luck!

Something went wrong with that request. Please try again.