Skip to content

pvlib appears to be currently incompatible with Python 3.15 due to h5py dependency #2944

Closed

Description

@markcampanelli

Describe the bug
I cannot pip install pvlib using Python 3.15.2 due to the h5py dependency apparently not yet being supported.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Python 3.15.2 venv.
  2. pip install pvlib
  3. See error:
Building wheels for collected packages: h5py
  Building wheel for h5py (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for h5py (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [78 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.macosx-26.6-arm64-cpython-315/h5py
      copying h5py/h5py_warnings.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py
      copying h5py/version.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py
      copying h5py/__init__.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py
      copying h5py/ipy_completer.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py
      creating build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/files.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/compat.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/__init__.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/selections.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/dataset.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/vds.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/selections2.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/group.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/datatype.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/attrs.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/dims.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/base.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      copying h5py/_hl/filters.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/_hl
      creating build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_dimension_scales.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_attribute_create.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_file_image.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/conftest.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_h5f.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_dataset_getitem.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_h5z.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_group.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_errors.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_dataset_swmr.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_slicing.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_native_complex.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_h5pl.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_attrs.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/__init__.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_attrs_data.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_h5t.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_big_endian_file.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_h5p.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_h5o.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_datatype.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/common.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_h5s.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_dataset.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_file.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_selections.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_ros3.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_dtype.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_h5.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_file2.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_completions.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_filters.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_base.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_objects.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_npystrings.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      copying h5py/tests/test_file_alignment.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests
      creating build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/data_files
      copying h5py/tests/data_files/__init__.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/data_files
      creating build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/test_vds
      copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/test_vds
      copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/test_vds
      copying h5py/tests/test_vds/__init__.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/test_vds
      copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/test_vds
      copying h5py/tests/data_files/compound-dtype-complex.h5 -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/data_files
      copying h5py/tests/data_files/vlen_string_s390x.h5 -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/data_files
      copying h5py/tests/data_files/vlen_string_dset_utc.h5 -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/data_files
      copying h5py/tests/data_files/vlen_string_dset.h5 -> build/lib.macosx-26.6-arm64-cpython-315/h5py/tests/data_files
      running build_ext
      Loading library to get build settings and version: libhdf5.dylib
      error: Unable to load dependency HDF5, make sure HDF5 is installed properly
      on sys.platform='darwin' with platform.machine()='arm64'
      Library dirs checked: []
      error: dlopen(libhdf5.dylib, 0x0006): tried: 'libhdf5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibhdf5.dylib' (no such file), '/opt/homebrew/opt/openssl@4/lib/libhdf5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/openssl@4/lib/libhdf5.dylib' (no such file), '/Users/markcampanelli/.pyenv/versions/3.15.2/lib/libhdf5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/markcampanelli/.pyenv/versions/3.15.2/lib/libhdf5.dylib' (no such file), '/opt/homebrew/lib/libhdf5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libhdf5.dylib' (no such file), '/opt/homebrew/opt/openssl@4/lib/libhdf5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/openssl@4/lib/libhdf5.dylib' (nosuch file), '/Users/markcampanelli/.pyenv/versions/3.15.2/lib/libhdf5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/markcampanelli/.pyenv/versions/3.15.2/lib/libhdf5.dylib' (no such file), '/opt/homebrew/lib/libhdf5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libhdf5.dylib' (no such file), '/usr/lib/libhdf5.dylib' (no such file, not in dyld cache), 'libhdf5.dylib' (no such file)
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for h5py
Failed to build h5py

Expected behavior
pvlib installs

Screenshots
None

Versions:

  • pvlib.__version__: v0.16.1
  • pandas.__version__: N/A
  • python: 3.15.2
  • os: MacOS 26.6.2 (also fails in ubuntu in my Github CI)

Additional context
Apparently wheels are not yet available for h5py. Putting a hard upper bound on Python at <3.15 until pvlib has been tested against it would have saved me a lot of time.

Activity

  1. echedey-ls commented on Nov 14, 2026

    @echedey-ls
    Member

    Xref h5py/h5py#2993

    a lot of time

    How much?

    It took me like 11 mins cause I had to compile python 3.15 for my system (but h5py wheel did compile successfully, IDK why). It would have been easier to make a Py3.15 support PR and see its outcome, for sure.

    Details

    ~/Documents/10_Programming/pvlib-python maint/ci-cd-updates* ≡
    venv315 ❯ pip install .
    Processing ./.
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... done
    Collecting numpy>=1.23.2 (from pvlib==0.16.2.dev24+gad0e4fa6b)
      Downloading numpy-2.5.4-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (6.6 kB)
    Collecting pandas>=1.5.0 (from pvlib==0.16.2.dev24+gad0e4fa6b)
      Downloading pandas-3.1.1-cp315-cp315-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (16 kB)
    Collecting pytz (from pvlib==0.16.2.dev24+gad0e4fa6b)
      Using cached pytz-2026.6-py2.py3-none-any.whl.metadata (22 kB)
    Collecting requests (from pvlib==0.16.2.dev24+gad0e4fa6b)
      Using cached requests-2.34.2-py3-none-any.whl.metadata (4.8 kB)
    Collecting scipy>=1.9.2 (from pvlib==0.16.2.dev24+gad0e4fa6b)
      Downloading scipy-1.18.1-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (62 kB)
    Collecting h5py (from pvlib==0.16.2.dev24+gad0e4fa6b)
      Downloading h5py-3.16.0.tar.gz (446 kB)
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... done
    Collecting tzdata (from pvlib==0.16.2.dev24+gad0e4fa6b)
      Using cached tzdata-2026.6-py2.py3-none-any.whl.metadata (1.4 kB)
    Collecting python-dateutil>=2.9.0 (from pandas>=1.5.0->pvlib==0.16.2.dev24+gad0e4fa6b)
      Using cached python_dateutil-4.0.0-py3-none-any.whl.metadata (7.3 kB)
    Collecting charset_normalizer<4,>=2 (from requests->pvlib==0.16.2.dev24+gad0e4fa6b)
      Downloading charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (46 kB)
    Collecting idna<4,>=2.5 (from requests->pvlib==0.16.2.dev24+gad0e4fa6b)
      Using cached idna-3.20-py3-none-any.whl.metadata (7.2 kB)
    Collecting urllib3<3,>=1.26 (from requests->pvlib==0.16.2.dev24+gad0e4fa6b)
      Using cached urllib3-2.8.0-py3-none-any.whl.metadata (7.4 kB)
    Collecting certifi>=2023.5.7 (from requests->pvlib==0.16.2.dev24+gad0e4fa6b)
      Using cached certifi-2026.10.23-py3-none-any.whl.metadata (2.5 kB)
    Using cached numpy-2.5.4-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.7 MB)
    Downloading pandas-3.1.1-cp315-cp315-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (12.0 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.0/12.0 MB 10.4 MB/s  0:00:01
    Using cached python_dateutil-4.0.0-py3-none-any.whl (92 kB)
    Downloading scipy-1.18.1-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (35.3 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.3/35.3 MB 8.0 MB/s  0:00:04
    Using cached pytz-2026.6-py2.py3-none-any.whl (506 kB)
    Using cached requests-2.34.2-py3-none-any.whl (73 kB)
    Downloading charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (257 kB)
    Using cached idna-3.20-py3-none-any.whl (69 kB)
    Using cached urllib3-2.8.0-py3-none-any.whl (135 kB)
    Using cached certifi-2026.10.23-py3-none-any.whl (135 kB)
    Using cached tzdata-2026.6-py2.py3-none-any.whl (348 kB)
    Building wheels for collected packages: pvlib, h5py
      Building wheel for pvlib (pyproject.toml) ... done
      Created wheel for pvlib: filename=pvlib-0.16.2.dev24+gad0e4fa6b-py3-none-any.whl size=19378986 sha256=b1000983abc562e231cc170525dbd98ef6b297409669142187f95636e53704f1
      Stored in directory: /tmp/pip-ephem-wheel-cache-x3xcbmm3/wheels/01/5c/43/c0c098e4492082a9a8fa1cc811a3dc4237dad98c7985ee213b
      Building wheel for h5py (pyproject.toml) ... done
      Created wheel for h5py: filename=h5py-3.16.0-cp315-cp315-linux_x86_64.whl size=10131698 sha256=749107c40bfb944b2ab4f0087414c62dce42f6af72681e617597a922ee80a62c
      Stored in directory: /home/echedey/.cache/pip/wheels/e1/70/7b/af22fc430e6e3b0caf9de22e7506e409d7f9b43721f7b5f53c
    Successfully built pvlib h5py
    Installing collected packages: pytz, urllib3, tzdata, numpy, idna, charset_normalizer, certifi, scipy, requests, python-dateutil, h5py, pandas, pvlib
    Successfully installed certifi-2026.10.23 charset_normalizer-3.5.2 h5py-3.16.0 idna-3.20 numpy-2.5.4 pandas-3.1.1 pvlib-0.16.2.dev24+gad0e4fa6b python-dateutil-4.0.0 pytz-2026.6 requests-2.34.2 scipy-1.18.1 tzdata-2026.6 urllib3-2.8.0
    ~/Documents/10_Programming/pvlib-python maint/ci-cd-updates* ≡ 6s
    venv315 ❯ python
    Python 3.15.2 (main, Nov 14 2026, 10:54:28) [GCC 16.2.1 20260810] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    Ctrl click to launch VS Code Native REPL
    >>> import h5py
    >>> 
    

  2. markcampanelli commented on Nov 14, 2026

    @markcampanelli
    ContributorAuthor

    Thanks for the issue link. I'll keep an eye on it.

    It broke first in pvfit's CI after I added 3.15 to the Python build matrix. Google AI gave multiple answers on how to fix (missing library for linker?), which was different between at least Ubuntu and macOS. I'd rather just wait for PyPI wheels than start complecting my build scripts based on OS. (I didn't even get to the Windows CI builds, which may have actually been ok. I don't use Windows locally.)

    I get that this might be considered a "soft" breakage, as pvlib might not be expected to have all batteries included (such as dependency wheels).

    Other things that I spent time on were the "optional" extras, where the DoE amazingly seems to have yanked nrel-pysam from PyPI and solarfactors is a circular dependency. Admittedly, I was "poking around" when these popped up.

    One thought I had was to try to instead use the tables option to pandas to read in the h5 files (which essentially swaps the h5py dependency for PyTables), but apparently for some reason that would require a h5 file-formatting change.

    Python version updates often, dare I say usually, break stuff. My ultimate workaround to update pvfit builds to start allowing Python 3.15 was to skip the pvlib optional install on Python 3.15 and put a skip decorator on the test of the one demo script that uses pvlib. Notice how the situation is somewhat messy, but the incompatibility and workaround at least have some reasonably visible guardrails. Note also that the CI is apparently set up to build without expecting any compilers and such, which is probably good for users.

    See also

  3. williamhobbs commented on Nov 14, 2026

    @williamhobbs
    Contributor

    DoE amazingly seems to have yanked nrel-pysam from PyPI

    I think you should be using nlr-pysam now. Both are still on pypi (https://pypi.org/project/NLR-PySAM/, https://pypi.org/project/NREL-PySAM/)

    pip show nlr-pysam doesn't find a package for some reason, but pip install nlr-pysam seems to work just fine.

    Edit: related: #2871

  4. markcampanelli commented on Nov 14, 2026

    @markcampanelli
    ContributorAuthor

    Draft PR to solve this: #2945

    I'm happy to chase down conda-only test failures, so long as maintainers are ok with the upper bound on Python version.

  5. echedey-ls commented on Nov 14, 2026

    @echedey-ls
    Member

    @williamhobbs

    pip show nlr-pysam doesn't find a package for some reason

    Description
    Show information about one or more installed packages.

    https://pip.pypa.io/en/stable/cli/pip_show/

    @markcampanelli this issue deserves a PR on py3.15 support in the tests CI/CD - the nrel-pysam to nrl-pysam is addressed in #2872

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions