Skip to content Skip to sidebar Skip to footer

Using Numpy With Pypy

I am using some numpy tools (mainly arrays) and I wanted to run the script with pypy, but i can't make it work. The error that i get is: ImportError: No module named multiarray. I

Solution 1:

I've just posted a blog post explaining what's the status and what's the plan. In short numpy will not work with PyPy's cpyext and even if it does, it would be too slow for usage.


Solution 2:

The other answers are quite old.

Here is the the completely unscientific measure of "implemented functions" on numpypy status page

Some posts from the pypy blog about numpy:

  1. MAY 4, 2011
  2. MAY 5, 2011
  3. APRIL 17, 2012
  4. SEPTEMBER 4, 2012
  5. NOVEMBER 1, 2012
  6. MARCH 18, 2013
  7. MAY 11, 2013
  8. DECEMBER 10, 2013

Solution 3:

Numpy status and build instruction has been changed recently. There is a special version of numpy which is ported to PyPy. If you want to get latest instruction just check PyPy blog for a latest article about Numpy. For the time of writing the latest instruction are in this post, which compiles to:

 pip install git+https://bitbucket.org/pypy/numpy.git

For what is implemented and what not you can check this page: http://buildbot.pypy.org/numpy-status/latest.html


Solution 4:

Previous answers now are obsolete :) http://morepypy.blogspot.com/2011/08/pypy-16-kickass-panda.html

The CPython extension module API has been improved and now supports many more extensions. For information on which one are supported, please refer to our compatibility wiki.

Preliminary support for NumPy: this release includes a preview of a very fast NumPy module integrated with the PyPy JIT.


Solution 5:

As far as I know, Numpy has never been succesfully ported to PyPy, and it is not trivial to do so as the C API for PyPy is different from the cPython one.

See also http://ademan.wordpress.com/category/code/pypy/ for the blog of someone that tried.


Post a Comment for "Using Numpy With Pypy"