fhs / pyhdf

Python wrapper around the NCSA HDF version 4 library
https://pypi.org/project/pyhdf/
Other
46 stars 15 forks source link

pip3 install pyhdf fails #41

Open tommycarstensen opened 4 years ago

tommycarstensen commented 4 years ago

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

pyhdf version: N/A HDF4 C library version: 4.2.5 Python version: 3.7

What operating system are you using?

OS X 10.15.3

What did you do?

pip3 install pyhdf

What did you see instead?

Collecting pyhdf
  Using cached pyhdf-0.10.2.tar.gz (149 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pyhdf
  Building wheel for pyhdf (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/fv/vsl0mc7d04j18txk9gr0qsn80000gn/T/tmpelxjpo0d
       cwd: /private/var/folders/fv/vsl0mc7d04j18txk9gr0qsn80000gn/T/pip-install-dtnp2rk7/pyhdf
  Complete output (40 lines):
  running bdist_wheel
  running build
  running config_cc
  unifing config_cc, config, build_clib, build_ext, build commands --compiler options
  running config_fc
  unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
  running build_src
  build_src
  building extension "pyhdf._hdfext" sources
  build_src: building npy-pkg config files
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.7
  creating build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/V.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/error.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/HDF.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/VS.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/six.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/SD.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/HC.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/hdfext.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  copying pyhdf/test_SD.py -> build/lib.macosx-10.9-x86_64-3.7/pyhdf
  running build_ext
  customize UnixCCompiler
  customize UnixCCompiler using build_ext
  building 'pyhdf._hdfext' extension
  compiling C sources
  C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g

  creating build/temp.macosx-10.9-x86_64-3.7/pyhdf
  compile options: '-I/private/var/folders/fv/vsl0mc7d04j18txk9gr0qsn80000gn/T/pip-build-env-r48ng4h7/overlay/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
  extra options: '-DNOSZIP'
  gcc: pyhdf/hdfext_wrap.c
  pyhdf/hdfext_wrap.c:3681:10: fatal error: 'hdf.h' file not found
  #include "hdf.h"
           ^~~~~~~
  1 error generated.
  error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/private/var/folders/fv/vsl0mc7d04j18txk9gr0qsn80000gn/T/pip-build-env-r48ng4h7/overlay/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c pyhdf/hdfext_wrap.c -o build/temp.macosx-10.9-x86_64-3.7/pyhdf/hdfext_wrap.o -MMD -MF build/temp.macosx-10.9-x86_64-3.7/pyhdf/hdfext_wrap.o.d -DNOSZIP" failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pyhdf
Failed to build pyhdf
ERROR: Could not build wheels for pyhdf which use PEP 517 and cannot be installed directly
man-shar commented 3 years ago

hey any luck with this?

asher-pembroke commented 3 years ago

Had the same problem on a mac. A workaround is conda-forge

conda install -c conda-forge pyhdf==0.10.2

gcaria commented 3 years ago

Adding --no-use-pep517 yields #47

kamraaan1997 commented 8 months ago

Hi, I am also facing the same error. Has anyone found a solution to it?