[CentralOH] Pypy and Virtualenv
iynaix at gmail.com
Sat Jun 15 21:55:47 CEST 2013
A question was brought up yesterday about how to use pypy with virtualenvs
at the DoJo yesterday, and I just wanted to provide a quick tip on how to
I'm assuming pypy has already been installed on your system. If it isn't,
there are some good instructions here: http://pypy.org/download.html
So after creating the directory that will house your project, set up a
virtualenv env -p `which pypy`
The crucial part is the latter portion of the command, which specifies
which python interpreter to use. After that, the virtualenv works as per
Whenever you're in the virtualenv, pypy would become the default python
interpreter, i.e running 'python' or 'pypy' launches the pypy interpreter.
(the python command is just a symlink to pypy)
P.S: This works if you want to run python 3 within a virtualenv as well,
e.g: virtualenv env -p `which python3`
P.P.S: This is for UNIX-like systems only and won't work on windows.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CentralOH