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

Import mtpy fails with DLL load #68

Open
Coastal0 opened this issue Nov 14, 2024 · 1 comment
Open

Import mtpy fails with DLL load #68

Coastal0 opened this issue Nov 14, 2024 · 1 comment

Comments

@Coastal0
Copy link

Hi, I'm trying to start using mtpy but cannot even import the module. Attempting to import mtpy fails to load, citing 'ImportError: DLL load failed while importing defs: The specified procedure could not be found.' Install environment from a fresh Anaconda base build.

Any advice appreciated. Thanks,

import mtpy
2024-11-14T11:38:04.450912+0800 | WARNING | mtpy.modeling.simpeg.recipes.inversion_1d | <module> | Could not import Simpeg.
Traceback (most recent call last):

  Cell In[1], line 1
    import mtpy

  File ~\AppData\Local\anaconda3\Lib\site-packages\mtpy\__init__.py:16
    from mtpy.core.mt_data import MTData

  File ~\AppData\Local\anaconda3\Lib\site-packages\mtpy\core\mt_data.py:40
    from mth5.helpers import validate_name

  File ~\AppData\Local\anaconda3\Lib\site-packages\mth5\__init__.py:9
    import h5py

  File ~\AppData\Local\anaconda3\Lib\site-packages\h5py\__init__.py:33
    from . import version

  File ~\AppData\Local\anaconda3\Lib\site-packages\h5py\version.py:15
    from . import h5 as _h5

  File h5py\\h5.pyx:1 in init h5py.h5

ImportError: DLL load failed while importing defs: The specified procedure could not be found.

Your Environment

  • Operating system: Win10
  • MtPy version: conda install -c conda-forge mtpy-v2
  • Python version: 3.12
@Coastal0
Copy link
Author

Update: This seems to be specific to the Conda install, potentially as part of the h5py dependencies (broken from numpy v2?)
Installing via pip seems to work OK.

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