Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in magic_calib_to_dl1.py with MCP-v0.3.1 #235

Open
abhradeep-1996 opened this issue Jul 4, 2024 · 1 comment
Open

Error in magic_calib_to_dl1.py with MCP-v0.3.1 #235

abhradeep-1996 opened this issue Jul 4, 2024 · 1 comment

Comments

@abhradeep-1996
Copy link

While running magic_calib_to_dl1.py, it produced the following error message:
"
RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe
Traceback (most recent call last):
File "magic_calib_to_dl1.py", line 47, in
from astropy import units as u
File "/home/abhradeep.roy/miniconda3/envs/magic-lst1_v0.3.1/lib/python3.8/site-packages/astropy/init.py", line 42, in
from . import config as _config # noqa: E402
File "/home/abhradeep.roy/miniconda3/envs/magic-lst1_v0.3.1/lib/python3.8/site-packages/astropy/config/init.py", line 10, in
from .configuration import *
File "/home/abhradeep.roy/miniconda3/envs/magic-lst1_v0.3.1/lib/python3.8/site-packages/astropy/config/configuration.py", line 24, in
from astropy.utils import find_current_module, silence
File "/home/abhradeep.roy/miniconda3/envs/magic-lst1_v0.3.1/lib/python3.8/site-packages/astropy/utils/init.py", line 18, in
from .decorators import * # noqa
File "/home/abhradeep.roy/miniconda3/envs/magic-lst1_v0.3.1/lib/python3.8/site-packages/astropy/utils/decorators.py", line 15, in
from .exceptions import (AstropyDeprecationWarning, AstropyUserWarning,
File "/home/abhradeep.roy/miniconda3/envs/magic-lst1_v0.3.1/lib/python3.8/site-packages/astropy/utils/exceptions.py", line 11, in
from erfa import ErfaError, ErfaWarning # noqa
File "/home/abhradeep.roy/miniconda3/envs/magic-lst1_v0.3.1/lib/python3.8/site-packages/erfa/init.py", line 5, in
from .version import version as version # noqa
File "/home/abhradeep.roy/miniconda3/envs/magic-lst1_v0.3.1/lib/python3.8/site-packages/erfa/version.py", line 25, in
from . import ufunc
ImportError: numpy.core.multiarray failed to import
"

Probably the reason is version incompatibility between various dependencies.

@abhradeep-1996
Copy link
Author

abhradeep-1996 commented Jul 4, 2024

I think I have solved the issue for now. There were a lot of version incompatibilities with numpy 1.21.6.
I am giving the steps below to solve the issues:

  1. Error: RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe
    Solution: downgrade pyerfa 2.0.0.3 to pyerfa 2.0.0.1
    downgrade numba 0.58.0 to numba 0.57.0

Then several packages needed recompilation according to these downgraded packages. So, I had to follow these steps:

  1. Error: ImportError: numpy.core.multiarray failed to import
    Solution: uninstall and reinstall matplotlib 3.7.3
  2. Error: ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
    Solution: uninstall and reinstall eventio 1.11.5
  3. Error: ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
    Solution: uninstall and reinstall h5py 3.11.0
  4. Error: ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 232 from C header, got 216 from PyObject
    Solution: uninstall and reinstall tables-3.8.0

Now, "magic_calib_to_dl1.py" is working properly with MCP-0.3.1.
But, please suggest if there is any better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant