bashtage/ng-numpy-randomstate

Can not be used on Debian 9

jyzhang-bjtu opened this issue · 3 comments

My python is 3.5 and Numpy is 1.12 from Debian source on Debian 9. When I use randomstate, the error msg is given as follows:

import randomstate.prng.mt19937 as rnd
Traceback (most recent call last):
File "init.pxd", line 1011, in numpy.import_array
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.5/dist-packages/randomstate/init.py", line 3, in
from randomstate.prng.mt19937 import *
File "/usr/local/lib/python3.5/dist-packages/randomstate/prng/init.py", line 1, in
from .xorshift128 import xorshift128
File "/usr/local/lib/python3.5/dist-packages/randomstate/prng/xorshift128/init.py", line 1, in
from .xorshift128 import *
File "randomstate/xorshift128.pyx", line 28, in init randomstate.xorshift128
File "init.pxd", line 1013, in numpy.import_array
ImportError: numpy.core.multiarray failed to import

Sounds like the many Linux wheels require numpy 1.13 so you will need to build from source.

You can use pip install randomstate --no-binary

Thanks a lot. It works with numpy 1.13.