How to install PyPy3 (2.1, beta) on Ubuntu?
How do I go about installing PyPy3 on Ubuntu 13.04? The download link is here: http://pypy.org/download.html
I've downloaded the Linux 64-bit binary and the .tar.gz source. I'm able to run pypy binary through the terminal, but that's not a very ideal implementation as it requires me to point to the pypy binary directory every time I want to use it.
The source won't really compile, and gives me this error:
Building PyPy with JIT, it'll take about 40 minutes and 4G of RAM
rpython/bin/rpython -Ojit pypy/goal/targetpypystandalone.py
/usr/bin/env: pypy: No such file or directory
make: *** [pypy-c] Error 127
I'm well aware that PyPy3 is beta software, but I'd like to have a spin with it anyway.
edit: After installing the pypy (Python 2) package provided by Ubuntu, I got a little further with the compilation process. A link to the output: http://pastebin.com/qTMkPsEP
My thanks to chronitis. There were some dependency errors. Correct course of actions:
sudo apt-get install \
gcc make python-dev libffi-dev libsqlite3-dev pkg-config \
libz-dev libbz2-dev libncurses-dev libexpat1-dev \
libssl-dev libgc-dev python-sphinx python-greenlet
Then:
cd PATH/pypy3-2.1-beta1-src/pypy/goal
Then you want to build pypy:
pypy ../../rpython/bin/rpython -Ojit targetpypystandalone
That will take 40 minutes. After compiling is done, you will get a pypy
or pypy-c
(I can't recall) file in PATH/pypy3-2.1-beta1-src/pypy/goal
. Rename this to pypy3
for your own convenience. Now, this is where I got stuck, as I have no idea how to neatly package this up and install through a .deb file. Instead, I did this:
cd /usr/local/bin
sudo ln -s "PATH/pypy3-2.1-beta1-src/pypy/goal/pypy3" .
This creates a symbolic link (shortcut) to the location of the pypy3
file. Now, when you type pypy3
in the terminal, it'll launch. It's not a neat solution, but seeing as PyPy3 is in beta anyway, that'll have to do. If somebody wants to point out how to package the thing up, that'd be magnificent, though.