Cannot import numpy in pypy3 (installs fine with pip)

Viewed 1171

Been trying to install numpy on pypy3 with pip. The install works fine, but when I do import numpy, I get the following error. Anyone have any advice?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/carl/pypy3-v6.0.0-linux64/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/home/carl/pypy3-v6.0.0-linux64/site-packages/numpy/core/__init__.py", line 16, in <module>
    from . import multiarray
  File "/home/carl/pypy3-v6.0.0-linux64/site-packages/numpy/core/multiarray.py", line 44, in <module>
    arange.__module__ = 'numpy'
AttributeError: readonly attribute '__module__'

Using the latest pypy3 versions from the site on Ubuntu

Python 3.5.3 (fdd60ed87e94, Apr 24 2018, 06:10:04)
[PyPy 6.0.0 with GCC 6.2.0 20160901] on linux

Latest pip too

pip 18.1 from /home/carl/pypy3-v6.0.0-linux64/site-packages/pip (python 3.5)
1 Answers

numpy 1.16.0 is incompatible with pypy3 v6.0, more details here. The solution is to use either numpy 1.15.4, or to use a pypy3 nightly while waiting for the next release.

Related