Skip to content

Conda environment files are likely incompatible with MacOS 15.4 #416

@DavidT3

Description

@DavidT3

Having just updated to MacOS 15.4, I'm finding that the original conda environments for XGA/DAXA no longer work, with a numpy import issue:

import numpy
Traceback (most recent call last):
File "/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/init.py", line 23, in
from . import multiarray
File "/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/multiarray.py", line 10, in
from . import overrides
File "/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/overrides.py", line 8, in
from numpy._core._multiarray_umath import (
ImportError: dlopen(/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/_multiarray_umath.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: <0B9C315B-A1DD-3527-88DB-4B90531D343F> /Users/dt237/software/anaconda3/envs/daxa_dev/lib/libopenblas.0.dylib
Reason: tried: '/Users/dt237/software/anaconda3/envs/daxa_dev/lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/bin/../lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/bin/../lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file, not in dyld cache)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/init.py", line 114, in
from numpy.config import show as show_config
File "/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/config.py", line 4, in
from numpy._core._multiarray_umath import (
File "/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/init.py", line 49, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.12 from "/Users/dt237/software/anaconda3/envs/daxa_dev/bin/python"
  • The NumPy version is: "2.0.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: dlopen(/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/_multiarray_umath.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: <0B9C315B-A1DD-3527-88DB-4B90531D343F> /Users/dt237/software/anaconda3/envs/daxa_dev/lib/libopenblas.0.dylib
Reason: tried: '/Users/dt237/software/anaconda3/envs/daxa_dev/lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/bin/../lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/Users/dt237/software/anaconda3/envs/daxa_dev/bin/../lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file, not in dyld cache)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 1, in
File "/Users/dt237/software/anaconda3/envs/daxa_dev/lib/python3.12/site-packages/numpy/init.py", line 119, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.

This issue persists even when re-creating the conda environment from DAXA's conda-lock file; the following stack overflow response may give us the reason:

https://stackoverflow.com/a/79558006

Which would explain why this error doesn't crop up when I made a new environment from scratch.

As such, need to remake the conda environment and lock files.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions