equinor / segyio

Fast Python library for SEGY files.
Other
480 stars 215 forks source link

How do I solve ImportError: DLL load failed: The specified module could not be found #489

Closed CDpy-GH closed 3 years ago

CDpy-GH commented 3 years ago

My goal is to read a SGY Header file to extract weathering velocity in a bulk of files I have in a repo. I'm working in windows 10. Using the code below I was just testing the functionality of the segyio (version = '1.9.0', installed using conda forge), but I got the following error:

import segyio  
import numpy as np  
import matplotlib.pyplot as plt  

pth = r"D:\Documents - D drive\2020\aaa\bbb\ccc.SGY"  
segyfile = segyio.open(pth, ignore_geometry=True)  
segyfile

Traceback:

WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.
WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.
WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-dea1e137903b> in <module>
      1 pth = r"D:\Documents - D drive\2020\aaa\bbb\ccc.SGY"
----> 2 segyfile = segyio.open(pth, ignore_geometry=True)
      3 # segyfile

C:\ProgramData\Anaconda3\lib\site-packages\segyio\open.py in open(filename, mode, iline, xline, strict, ignore_geometry, endian)
    159         raise ValueError(problem.format(endian) + opts)
    160 
--> 161     from . import _segyio
    162     fd = _segyio.segyiofd(str(filename), mode, endians[endian])
    163     fd.segyopen()

ImportError: DLL load failed: The specified module could not be found.

There are a couple of mentions (#483 and #435) about same error message but any of them could help me to solve it, in #421 says "Problem solved by installing version 1.9.0a1", where can I download that version to test? or maybe you have a suggestions on how to solve the issue?

jokva commented 3 years ago

Looks like the conda packages haven't been updated for a bit, so 1.9.0 is still the latest available. I've started the work to get 1.9.3 published.

jokva commented 3 years ago

You can try 1.9.3 from conda now

https://anaconda.org/conda-forge/segyio/files

CDpy-GH commented 3 years ago

Jokva, thank you very much. Problem solved. New version doesn't give me the error.