Skip to content

Installation issue with pip and pyhdf #43

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

Open
snorre2 opened this issue May 14, 2020 · 0 comments
Open

Installation issue with pip and pyhdf #43

snorre2 opened this issue May 14, 2020 · 0 comments

Comments

@snorre2
Copy link

snorre2 commented May 14, 2020

What version of pyhdf, HDF4, and Python are you using?

pyhdf version: 0.10.2
HDF4 C library version: hdf-4.2.14
Python version: Python 2.7.16

What operating system are you using?

Linux (CentOS 7.7)

What did you do?

python -m pip install --no-build-isolation --global-option=build_ext --global-option="-L/usr/local/pkgs/szip_2.1/lib" pyhdf

cp /usr/local/pkgs-modules/Python_2.7.8/lib/python2.7/site-packages/pyhdf/_hdfext.so /usr/local/pkgs-modules/Python_2.7.8/lib/python2.7/site-packages

from pyhdf.SD import SD, SDC

What did you expect to see?

No error message, imports correctly.

What did you see instead?

Issue with finding szip library.

File "/usr/local/pkgs-modules/Python_2.7.16/lib/python2.7/site-packages/pyhdf/SD.py", line 1003, in
from . import hdfext as _C
File "/usr/local/pkgs-modules/Python_2.7.16/lib/python2.7/site-packages/pyhdf/hdfext.py", line 17, in
_hdfext = swig_import_helper()
File "/usr/local/pkgs-modules/Python_2.7.16/lib/python2.7/site-packages/pyhdf/hdfext.py", line 16, in swig_import_helper
return importlib.import_module('_hdfext')
File "/usr/local/pkgs-modules/Python_2.7.16/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: /usr/local/pkgs-modules/Python_2.7.16/lib/python2.7/site-packages/_hdfext.so: undefined symbol: SZ_BufftoBuffDecompress

Related bugs

See this related ticket/issue: #8

I'm experiencing this exact same issue, where the "szip" library is not found.

In our case, we needed to install "pyhdf" with the --no-build-isolation, and we also had to copy the _hdfext.so into the site-packages directory to fix the issue of that library not being found.

This szip library is installed in "/usr/local/pkgs/szip_2.1/lib". And copying libsz.so.2 into site-packages did not work.

Where should this szip library go, if putting it in root /lib/ is not possible (we are using GNU modules)?

See man 8 ldconfig. My guess is either ldconfig cache is out of date or you don't have /usr/local/lib in /etc/ld.so.conf

My pip issue is at: pypa/pip#8060

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

No branches or pull requests

2 participants