Skip to content

Conversation

@swryan
Copy link
Contributor

@swryan swryan commented Jul 17, 2025

Summary

A user was getting errors after running the script in a conda environment without first installing SciPy (see below). This was traced to the fact that SciPy was getting installed from PyPI (as a dependency of pyoptsparse) and that package seemed to be incompatible with the other packages (e.g. lapack) that are installed from conda-forge by the script.

This change will install NumPy and Scipy from conda-forge before installing pyoptsparse if they are not installed, or re-install them from conda-forge if they were previously installed from PyPI. This only happens when conda is enabled.

Tests were added to the GitHub workflow to exercise these scenarios.

Also:

  • one of the tests in the matrix was updated to test with SciPy 1.16, which was released recently.
Traceback (most recent call last):
  File "/Users/hschilli/miniforge3/envs/aviary/lib/python3.13/site-packages/numpy/core/__init__.py", line 24, in <module>
    from . import multiarray
  File "/Users/hschilli/miniforge3/envs/aviary/lib/python3.13/site-packages/numpy/core/multiarray.py", line 10, in <module>
    from . import overrides
  File "/Users/hschilli/miniforge3/envs/aviary/lib/python3.13/site-packages/numpy/core/overrides.py", line 8, in <module>
    from numpy.core._multiarray_umath import (
        add_docstring,  _get_implementing_args, _ArrayFunctionDispatcher)
ImportError: dlopen(/Users/hschilli/miniforge3/envs/aviary/lib/python3.13/site-packages/numpy/core/_multiarray_umath.cpython-313-darwin.so, 0x0002): Symbol not found: _cblas_caxpy$NEWLAPACK
  Referenced from: <27F2E2CD-A30E-38A6-A06C-0F5D7A0C22DC> /Users/hschilli/miniforge3/envs/aviary/lib/python3.13/site-packages/numpy/core/_multiarray_umath.cpython-313-darwin.so
  Expected in:     <3B8CB844-AEA9-37CA-901A-0BDC04DC268D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

@swryan swryan merged commit cd0452b into OpenMDAO:master Jul 24, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant