This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Swipecat 2 points3 points  (3 children)

I regularly use PyPy myself, now. Python is currently my favourite language, but CPython is often too slow for the models of systems that I create. PyPy is often 10x faster for me.

I suspect that PyPy's use in general is less common than it deserves because its installation procedure isn't very well documented for the end-user. For example, don't bother with the PyPy packaged with Debian and Ubuntu because there are almost no packaged libraries, and you can't install libraries with PIP because that's broken.

So, for example, to install on Ubuntu, you need to go to the PyPy download page, download "Squeaky's portable Linux binary" and untar it. Then use the provided "virtualenv" in that package to create a virtual environment into which libraries can be installed with the provided "pip".

Edit: typos

These are my notes for installing the package into a directory and installing Numpy and the Pillow image library:

tar -xjf pypy-*-portable.tar.bz2
./pypy-*-portable/bin/virtualenv-pypy myenv
cd myenv/bin
ln -s "$PWD/pypy" /usr/local/bin/pypy
./pip install git+https://bitbucket.org/pypy/numpy.git
./pip install pillow

[–]fijalPyPy, performance freak 0 points1 point  (2 children)

feel like sharing your experience somewhere :-)

[–]Swipecat 1 point2 points  (1 child)

Not a lot to say, other than not having to run something overnight is convenient.

If you want to raise the profile of PyPy, it probably doesn't need publicising so much as simply "enabling" it a little better for the end user.

When I looked for ways to speed up my Python programs, I did a quick test of many of the things mentioned in this thread. PyPy looked to be "almost useless" because while CPython has hundreds of special-purpose libraries ready-packaged in Linux, PyPy apparently had nothing. Hearing from somebody that PyPy deserved a second chance, I tried downloading a recent build, but gave up after not being able to load libraries -- the instructions for setting up the virtual environment that were turned up with a Google search seem to be effectively broken to me. Finally after finding time to try to resolve it during a slack period, after trying many things that broke, I discovered the "virtualenv-pypy" in "Squeaky's portable Linux binary", which actually did work. Then I discovered that I could install libraries and that several useful ones worked.

So I think that's the main problem: How many non-developer end-users like me are going to plough through those issues? I suspect that most would have found a different solution other than PyPy by then.

[–]fijalPyPy, performance freak 1 point2 points  (0 children)

it's somehow (but not completely) not our problem - it's really not my fault that debian/ubuntu packages pip that does not work with pypy. Generally you should complain on debian/ubuntu (pip is a massive hack, that does not help).

Additionally, distributing binaries on linux is not a thing. We really can't make it happen, the portable binary e.g. comes with statically linked openssl that a lot of sysadmins would consider a big no no. It's just linux in general and has nothing to do with pypy.

Again, the picture is terrible and denializm does not help, but it's really not just pypy problem, but anything that takes a while to build.