I have been using PyPy from 1.6. Now PyPy 2.0beta1 is out. Most of python libraries which don’t have c extensions
as dependencies work(exceptions are present).
E.g: requests, fabric, gunicorn
Install PyPy2.0beta1
-
Grab 32 or 64 bit pypy2.0 beta1. If you are using ubuntu grab
libc2.5
.
`` bzip2 pypy-2.0-beta1-linux64-libc2.15.tar.bz2 ``
`` tar -xvf pypy-2.0-beta1-linux64-libc2.15.tar ``
<code>curl -O <a href="http://python-distribute.org/distribute_setup.py" target="_blank">http://python-distribute.org/distribute_setup.py</a></code>
<code>curl -O <a href="https://raw.github.com/pypa/pip/master/contrib/get-pip.py" target="_blank">https://raw.github.com/pypa/pip/master/contrib/get-pip.py</a></code>
`` ./pypy-2.0-beta1/bin/pypy distribute_setup.py ``
`` ./pypy-2.0-beta1/bin/pypy get-pip.py ``
`` ./pypy-2.0-beta1/bin/pip install virtualenv ``
Please feel free to create `` alias ``. Here is sample alias.
alias pypy2b="/home/kracekumar/downloads/pypy-2.0-beta1/bin/pypy"
alias pypy2b-pip='/home/kracekumar/downloads/pypy-2.0-beta1/bin/pip'
alias pypy2b-venv='/home/kracekumar/downloads/pypy-2.0-beta1/bin/virtualenv'
Next ?
-
pypy2b-pip install fabric
-
Add
pypy bin
directory to$PATH, export PATH=$PATH:/home/kracekumar/downloads/pypy-2.0-beta1/bin
or open~/.bashrc
addexport PATH=$PATH:/home/kracekumar/downloads/pypy-2.0-beta1/bin
andsource ~/.bashrc
.
kracekumar@aadukalam:~/codes/python-wiktionary$ which fab
/home/kracekumar/downloads/pypy-2.0-beta1/bin/fab
kracekumar@aadukalam:~/codes/python-wiktionary$ catwhich fab
#!/home/kracekumar/downloads/pypy-2.0-beta1/bin/pypy
# EASY-INSTALL-ENTRY-SCRIPT: ‘Fabric==1.5.1’,‘console_scripts’,‘fab’
requires = ‘Fabric==1.5.1’
import sys
from pkg_resources import load_entry_point
if name == ’main’:
sys.exit( load_entry_point(‘Fabric==1.5.1’, ‘console_scripts’, ‘fab’)()
)
So fab
now uses pypy interpreter rather than CPython.
But there are other commands like history, gwibber-service
which are installed via apt-get
can’t use PyPy since apt-get
doesn’t support pypy
since it is unstable.
Thoughts
-
There should be way developer can specify in debian/ubuntu repo to look for PyPy in the user installation if not use CPython.
-
apt-get
is written in python, if distros shippypy
andapt-get
works well, there is a chancePyPy
will became main stream in linux packaging.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.