ripser.py icon indicating copy to clipboard operation
ripser.py copied to clipboard

install error of ripser on mac, python 3.7

Open qyzhang23 opened this issue 5 years ago • 2 comments

I have successfully installed ripser. But when import ripser, I got the following error. My numpy is up-to-date.

ValueError Traceback (most recent call last) in () 1 ----> 2 import ripser

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ripser/init.py in () ----> 1 from .ripser import * 2 3 from ._version import version

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ripser/ripser.py in () 36 import persim 37 ---> 38 from pyRipser import doRipsFiltrationDM as DRFDM 39 from pyRipser import doRipsFiltrationDMSparse as DRFDMSparse 40

venv/lib/python3.7/site-packages/Cython/Includes/numpy/init.pxd in init pyRipser()

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

qyzhang23 avatar Aug 09 '19 00:08 qyzhang23

@qyzhang23 What version of NumPy are you using?

@sauln @ctralie I have seen a similar issue with packages I maintain that build against NumPy. I suspect this occurred because ripser was built against a very new version of NumPy. I ended up pinning the host version to the oldest NumPy version that we support, so that it uses that when compiling Cython code for the conda-forge package. The header binary sizes are always forwards-compatible but not backwards compatible.

I would try making a fork of the conda-forge ripser-feedstock and adding an old version specifier for numpy in the host section of the recipe/meta.yml, then incrementing the build number (to update existing conda-forge packages without updating the ripser version). Make a PR from your fork to the upstream repo conda-forge/ripser-feedstock. That might help fix this problem after @qyzhang23 updates the package.

Example: https://github.com/conda-forge/freud-feedstock/blob/19521d7f3a776322ad5489237ebe59cf4d8b2579/recipe/meta.yaml#L29

bdice avatar Aug 09 '19 01:08 bdice

I am using NumPy 1.17.0. I also tried other versions ie. 1.16.1, 1.16.0, 1.15.4 and same error occurs.

在 2019年8月9日,上午2:50,Bradley Dice [email protected] 写道:

@qyzhang23 https://github.com/qyzhang23 What version of NumPy are you using?

@sauln https://github.com/sauln @ctralie https://github.com/ctralie I have seen a similar issue with packages I maintain that build against NumPy. I suspect this occurred because ripser was built against a very new version of NumPy. I ended up pinning the host version to the oldest NumPy version that we support, so that it uses that when compiling Cython code for the conda-forge package. The binary sizes are always forwards-compatible but not backwards compatible.

I would try making a fork of the conda-forge ripser-feedstock https://github.com/conda-forge/ripser-feedstock and adding an old version specifier for numpy in the host section of the recipe/meta.yml, then incrementing the build number (to update existing conda-forge packages without updating the ripser version). Make a PR from your fork to the upstream repo conda-forge/ripser-feedstock. That might help fix this problem after @qyzhang23 https://github.com/qyzhang23 updates the package.

Example: https://github.com/conda-forge/freud-feedstock/blob/19521d7f3a776322ad5489237ebe59cf4d8b2579/recipe/meta.yaml#L29 https://github.com/conda-forge/freud-feedstock/blob/19521d7f3a776322ad5489237ebe59cf4d8b2579/recipe/meta.yaml#L29 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/scikit-tda/ripser.py/issues/84?email_source=notifications&email_token=AJTYO53QCHNZVP4KL3MLB7TQDTEOJA5CNFSM4IKPQ4P2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD35LNQI#issuecomment-519747265, or mute the thread https://github.com/notifications/unsubscribe-auth/AJTYO553WFMNRIVTZ6WFECDQDTEOJANCNFSM4IKPQ4PQ.

qyzhang23 avatar Aug 09 '19 02:08 qyzhang23