[pypy-dev] numpy import error (pypy3)

matti picus matti.picus at gmail.com
Thu Sep 1 14:09:05 EDT 2016


On Thursday, 1 September 2016, Neal Becker <ndbecker2 at gmail.com> wrote:

> Newb here, trying out pypy3.  Used pip3 to install numpy with no error, but
> doesn't work:
>
>  ~/pypy3.3-5.2-alpha-20160602-linux_x86_64-portable/bin/pypy3
> Python 3.3.5 (27fa55f3a61023d76af3b38f34d1401b0b186076, May 31 2016,
> 17:54:15)
> [PyPy 5.2.0-alpha0 with GCC 4.9.2] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> And now for something completely different: ``the future has just begun''
> >>>> import numpy
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/home/nbecker/pypy3.3-5.2-alpha-20160602-linux_x86_64-
> portable/site-
> packages/numpy/__init__.py", line 180, in <module>
>     from . import add_newdocs
>   File "/home/nbecker/pypy3.3-5.2-alpha-20160602-linux_x86_64-
> portable/site-
> packages/numpy/add_newdocs.py", line 13, in <module>
>     from numpy.lib import add_newdoc
>   File "/home/nbecker/pypy3.3-5.2-alpha-20160602-linux_x86_64-
> portable/site-
> packages/numpy/lib/__init__.py", line 8, in <module>
>     from .type_check import *
>   File "/home/nbecker/pypy3.3-5.2-alpha-20160602-linux_x86_64-
> portable/site-
> packages/numpy/lib/type_check.py", line 11, in <module>
>     import numpy.core.numeric as _nx
>   File "/home/nbecker/pypy3.3-5.2-alpha-20160602-linux_x86_64-
> portable/site-
> packages/numpy/core/__init__.py", line 14, in <module>
>     from . import multiarray
> ImportError: unable to load extension module '/home/nbecker/pypy3.3-5.2-
> alpha-20160602-linux_x86_64-portable/site-
> packages/numpy/core/multiarray.pypy3-52.so': /home/nbecker/pypy3.3-5.2-
> alpha-20160602-linux_x86_64-portable/site-
> packages/numpy/core/multiarray.pypy3-52.so: undefined symbol:
> PyBytes_FromFormat
> >>>>
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org <javascript:;>
> https://mail.python.org/mailman/listinfo/pypy-dev
>

Numpy is not supported on pypy3.x, the cpyext layer is not complete. Even
on pypy2.7 you should use the latest developer version of numpy to get the
patches we submitted.
Matti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20160901/a4f0bc60/attachment.html>


More information about the pypy-dev mailing list