https://github.com/fhs/pyhdf/issues
droidmaximus opened this issue · comments
What version of pyhdf, HDF4, and Python are you using?
pyhdf version: 0.10.5
HDF4 C library version: 4.2.15
Python version: 3.10.2
What operating system are you using?
Windows
What did you do?
try to call the pyhdf.SD library
What did you expect to see?
pyhdf to read my hdf file
What did you see instead?
File "C:\Python310\lib\site-packages\pyhdf\hdfext.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "C:\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1176, in create_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ImportError: DLL load failed while importing _hdfext: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\Admin\Documents\LiDAR\visualizer.py", line 6, in <module>
from pyhdf.SD import SD, SDC
File "C:\Python310\lib\site-packages\pyhdf\SD.py", line 1003, in <module>
from . import hdfext as _C
File "C:\Python310\lib\site-packages\pyhdf\hdfext.py", line 17, in <module>
_hdfext = swig_import_helper()
File "C:\Python310\lib\site-packages\pyhdf\hdfext.py", line 16, in swig_import_helper
return importlib.import_module('_hdfext')
File "C:\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing _hdfext: The specified module could not be found.```
same happened to me, any news?
@brandus1 I installed pyhdf in my anaconda env and it worked somehow. I guess pip's version is buggy. You can just run conda install pyhdf.
Yes I know, but I have a project that forces me to use pip. It works fine on mac. It's just on windows that it doesn't. Would like to know how to fix it if possible
@brandus1 one crude method is to install the stable version in conda and copy paste the folder from the source package of the conda env after making sure there is no version mismatch of python. Can't guarantee it would work but it's something