healpy/healpy

healpy CFITSIO mismatch; No module named '_pixelfunc'

LuKaiXing opened this issue · 4 comments

importing healpy gives this warning:

WARNING: version mismatch between CFITSIO header (v40200) and linked library (v40300).

Then:


ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import healpy

File ~/.local/lib/python3.11/site-packages/healpy/init.py:91
28 from .pixelfunc import (
29 ma,
30 mask_good,
(...)
64 get_map_size,
65 )
67 from .sphtfunc import (
68 anafast,
69 map2alm_lsq,
(...)
88 resize_alm
89 )
---> 91 from ._query_disc import query_disc, query_strip, query_polygon, boundaries
92 from ._pixelfunc import ringinfo, pix2ring
94 from ._sphtools import rotate_alm

File healpy/src/_query_disc.pyx:10, in init healpy._query_disc()

ModuleNotFoundError: No module named '_pixelfunc'

How to fix it?

I can't be sure, but this looks like you compiled healpy yourself and maybe had some old .o files left in your tree.

Can you please try an installation from a clean checkout and report the commands and their outputs if the problem persists?

... or perhaps this is related to #867 ?

Duplicate of #867.

~>: conda config --add channels conda-forge
~>: conda install healpy

healpy works!