Skip to content

Support PySAM on Python 3.14 via the nlr-pysam package name #2871

Description

@mokazemi

Describe the bug
The optional nrel-pysam dependency used by pvlib is not installable on Python 3.14 under its current package name. The PySAM installation documentation states that PySAM 8.0.0 and newer are distributed as nlr-pysam, while older versions remain available as nrel-pysam:

https://nrel-pysam.readthedocs.io/en/main/installation.html

pvlib currently declares nrel-pysam in pyproject.toml, and the Python 3.14 CI requirements comment out nrel-pysam as unavailable. This prevents users on Python 3.14 from installing the optional dependency needed by pvlib.ivtools.sdm.fit_cec_sam().

To Reproduce

  1. Create a Python 3.14 environment.
  2. Install pvlib's optional dependencies, for example:
    python -m pip install "pvlib[optional]"
  3. Observe that installation fails or that the PySAM dependency cannot be resolved under the nrel-pysam name.

Alternatively, try installing the renamed distribution directly:

python -m pip install nlr-pysam

Expected behavior
Python 3.14 users should be able to install pvlib's optional dependencies and use the PySAM-backed functionality when a compatible PySAM release is available.

Screenshots

Versions:

  • pvlib.__version__: 0.16.1
  • pandas.__version__: 3.0.6
  • python: 3.14

Additional context
Could pvlib upgrade or otherwise adjust its optional dependency specification to use nlr-pysam for compatible versions/Python versions? In particular, please investigate whether the dependency can be changed from nrel-pysam to nlr-pysam.

The PySAM documentation says:

PySAM for Python 3.8 to 3.14 is available as nlr-pysam to distinguish it from the completely unrelated pysam package for genomic data sets.

PySAM 8.0.0 and newer versions are available as nlr-pysam. Older versions are available as nrel-pysam.

The import used by pvlib remains from PySAM import PySSC; the proposed change concerns the distribution name used for installation, not the Python import name. Since PySAM is optional, users who do not use the relevant functionality should remain unaffected.

Activity

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