opticspy / lightpipes

LightPipes for Python, "Pure Python version"
https://opticspy.github.io/lightpipes/
BSD 3-Clause "New" or "Revised" License
228 stars 53 forks source link

numpy version problems #30

Open simon-pho opened 4 years ago

simon-pho commented 4 years ago

Hi - tried installing LightPipes on Centos 7 with Anaconda Python. Error message upon import as follows:

Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 13 2017, 12:02:49)
Type "copyright", "credits" or "license" for more information.

IPython 6.1.0 -- An enhanced Interactive Python.

In [1]: import LightPipes
Traceback (most recent call last):

  File "<ipython-input-1-51e8ec217939>", line 1, in <module>
    import LightPipes

  File "/home/cad/anaconda/Anaconda3-5.0.1/lib/python3.6/site-packages/LightPipes/__init__.py", line 55, in <module>
    from ._LightPipes import * # noqa

  File "__init__.pxd", line 918, in init LightPipes._LightPipes

ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject

In[2]: import numpy
In[3]: numpy.__version__
Out[3]: '1.15.4'

Any idea what's going wrong?

Thanks for any help...

Simon

FredvanGoor commented 4 years ago

Maybe you have to update numpy. Fred

pasky10 commented 3 years ago

Hi, had the same problem, seems like an issue with a few versions of numpy. Under Anaconda prompt, I could make it work by forcing the installation of numpy to its version 1.16.1: conda install numpy=1.16.1 No other dependency needed except for numpy-base. Hope it helps. Laurent.