I re-create my env just now, I installed mamba, executed mamba update libgfortran5 ld64
, and removed the cache with rm -rf ~/.cache/fenics
. I’m still facing the super long error, that I give you again, followed by the result of conda env export
:
(env3-10-complex) pierremariotti@arm64-apple-darwin20 ABC_FEniCSx_classical % python test_oldABCnewVn.py
Traceback (most recent call last):
File "/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/__init__.py", line 23, in <module>
from . import multiarray
File "/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/multiarray.py", line 10, in <module>
from . import overrides
File "/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/overrides.py", line 7, in <module>
from numpy._core._multiarray_umath import (
ImportError: dlopen(/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/_multiarray_umath.cpython-310-darwin.so, 0x0002): Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: <CAA510D4-816A-34E5-9021-485EF5D56159> /opt/anaconda3/envs/env3-10-complex/lib/libopenblas.0.dylib
Reason: tried: '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/bin/../lib/libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/bin/../lib/libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/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 "/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/__init__.py", line 114, in <module>
from numpy.__config__ import show_config
File "/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/__config__.py", line 4, in <module>
from numpy._core._multiarray_umath import (
File "/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/__init__.py", line 49, in <module>
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.10 from "/opt/anaconda3/envs/env3-10-complex/bin/python"
* The NumPy version is: "2.2.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: dlopen(/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/_multiarray_umath.cpython-310-darwin.so, 0x0002): Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: <CAA510D4-816A-34E5-9021-485EF5D56159> /opt/anaconda3/envs/env3-10-complex/lib/libopenblas.0.dylib
Reason: tried: '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/bin/../lib/libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/opt/anaconda3/envs/env3-10-complex/bin/../lib/libgfortran.5.dylib' (code signature invalid in <C739582F-D95B-303A-9F86-7B43C361ECC7> '/opt/anaconda3/envs/env3-10-complex/lib/libgfortran.5.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x001BC120, codeBlobSize=0x00003C90), '/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 "/Users/pierremariotti/Documents/PhD/FEniCSx/new_try2/root/ABC_FEniCSx_classical/test_oldABCnewVn.py", line 1, in <module>
import numpy as np
File "/opt/anaconda3/envs/env3-10-complex/lib/python3.10/site-packages/numpy/__init__.py", line 119, in <module>
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.
The result of conda env export
:
(env3-10-complex) pierremariotti@arm64-apple-darwin20 ABC_FEniCSx_classical % conda env export
Error while loading conda entry point: conda-libmamba-solver (module 'libmambapy' has no attribute 'QueryFormat')
name: env3-10-complex
channels:
- conda-forge
- defaults
dependencies:
- bzip2=1.0.8=h99b78c6_7
- c-ares=1.34.5=h5505292_0
- c-blosc2=2.17.1=h9cbb436_0
- ca-certificates=2025.4.26=hbd8a1cb_0
- cctools_osx-arm64=1010.6=h3b4f5d3_6
- cffi=1.16.0=py310hdcd7c05_0
- clang=18.1.8=default_h474c9e2_9
- clang-18=18.1.8=default_hf90f093_9
- clang_impl_osx-arm64=18.1.8=h2ae9ea5_24
- clang_osx-arm64=18.1.8=h07b0088_24
- clangxx=18.1.8=default_h1ffe849_9
- compiler-rt=18.1.8=h856b3c1_1
- compiler-rt_osx-arm64=18.1.8=h832e737_1
- fenics-basix=0.9.0=py310h32526d0_2
- fenics-basix-nanobind-abi=0.2.1.18=h9b63b7c_2
- fenics-dolfinx=0.9.0=py310h6ec959d_12
- fenics-ffcx=0.9.0=pyh2e48890_0
- fenics-libbasix=0.9.0=hf7ae0cd_2
- fenics-libdolfinx=0.9.0=py310he0777b1_12
- fenics-ufcx=0.9.0=hb7f7608_0
- fenics-ufl=2024.2.0=pyhd8ed1ab_1
- fftw=3.3.10=mpi_mpich_hd148bab_10
- fmt=11.1.4=h440487c_1
- hdf5=1.14.3=mpi_mpich_h13a04de_9
- hypre=2.32.0=mpi_mpich_h189fe77_1
- icu=75.1=hfee45f7_0
- kahip=3.18=py310h3e50e70_0
- krb5=1.21.3=h237132a_0
- ld64_osx-arm64=951.9=hb6b49e2_6
- libadios2=2.10.2=mpi_mpich_hfe2f02c_5
- libaec=1.1.3=hebf3989_0
- libamd=3.3.3=h5087772_7100102
- libblas=3.9.0=31_h10e41b3_openblas
- libboost=1.86.0=hc9fb7c5_3
- libboost-devel=1.86.0=hf450f58_3
- libboost-headers=1.86.0=hce30654_3
- libbtf=2.3.2=h99b4a89_7100102
- libcamd=3.3.3=h99b4a89_7100102
- libcblas=3.9.0=31_hb3479ef_openblas
- libccolamd=3.3.4=h99b4a89_7100102
- libcholmod=5.3.1=hbba04d7_7100102
- libclang-cpp18.1=18.1.8=default_hf90f093_9
- libcolamd=3.3.4=h99b4a89_7100102
- libcurl=8.13.0=h73640d1_0
- libcxx=20.1.4=ha82da77_0
- libcxx-devel=18.1.8=h6dc3340_8
- libedit=3.1.20250104=pl5321hafb1f1b_0
- libev=4.33=h93a5062_2
- libexpat=2.7.0=h286801f_0
- libfabric=2.1.0=hce30654_1
- libfabric1=2.1.0=h5505292_1
- libffi=3.4.6=h1da3d7d_1
- libgfortran=5.0.0=14_2_0_h6c33f7e_103
- libgfortran5=14.2.0=h6c33f7e_103
- libglib=2.84.1=hbec27ea_1
- libhwloc=2.11.2=default_hbce5d74_1001
- libiconv=1.18=hfe07756_1
- libintl=0.24.1=h493aca8_0
- libklu=2.3.5=h4370aa4_7100102
- liblapack=3.9.0=31_hc9a63f6_openblas
- libllvm18=18.1.8=hc4b4ae8_3
- liblzma=5.8.1=h39f12f2_0
- libnghttp2=1.64.0=h6d7220d_0
- libopenblas=0.3.29=openmp_hf332438_0
- libpng=1.6.47=h3783ad8_0
- libptscotch=7.0.6=hcfc2647_1
- libscotch=7.0.6=hd10c9a7_1
- libsodium=1.0.20=h99b78c6_0
- libspqr=4.3.4=h775d698_7100102
- libsqlite=3.49.1=h3f77e49_2
- libssh2=1.11.1=h1590b86_0
- libsuitesparseconfig=7.10.1=h4a8fc20_7100102
- libumfpack=6.3.5=h7c2c975_7100102
- libxml2=2.13.7=h52572c6_1
- libzlib=1.3.1=h8359307_2
- llvm-openmp=20.1.4=hdb05f8b_0
- llvm-tools=18.1.8=hc4b4ae8_3
- llvm-tools-18=18.1.8=hc4b4ae8_3
- lz4-c=1.10.0=h286801f_1
- metis=5.1.0=h15f6cfe_1007
- mpi=1.0.1=mpich
- mpi4py=4.0.3=py310h8a9557c_0
- mpich=4.3.0=h9d9a6ae_100
- mumps-include=5.7.3=h71ed9e6_10
- mumps-mpi=5.7.3=h4795f8b_10
- ncurses=6.5=h5e97a16_3
- numpy=2.2.5=py310h4d83441_0
- openssl=3.5.0=h81ee809_1
- parmetis=4.0.3=ha4b917a_1007
- pcre2=10.45=ha881caa_0
- petsc=3.23.0=complex_hefb9e83_3
- petsc4py=3.23.0=np20py310h0b04470_0
- pip=25.1.1=pyh8b19718_0
- pkg-config=0.29.2=hde07d2e_1009
- pugixml=1.15=hd3d436d_0
- pycparser=2.22=pyh29332c3_1
- python=3.10.17=h6cefb37_0_cpython
- python_abi=3.10=7_cp310
- readline=8.2=h1d1bf99_2
- scalapack=2.2.0=h71a4f75_4
- setuptools=80.1.0=pyhff2d567_0
- sigtool=0.1.3=h44b9a77_0
- slepc=3.23.0=complex_h0e2a288_0
- slepc4py=3.23.0=np20py310h17657d0_0
- spdlog=1.15.2=h008cadb_0
- superlu=7.0.1=h81aaeaf_0
- superlu_dist=9.1.0=h89afcdd_0
- tapi=1300.6.5=h03f4b80_0
- tk=8.6.13=h5083fa2_1
- tzdata=2025b=h78e105d_0
- wheel=0.45.1=pyhd8ed1ab_1
- yaml=0.2.5=h3422bc3_2
- zeromq=4.3.5=hc1bb282_7
- zfp=1.0.1=h1c5d8ea_2
- zlib-ng=2.2.4=h13dfb9a_0
- zstd=1.5.7=h6491c7d_2
prefix: /opt/anaconda3/envs/env3-10-complex
(env3-10-complex) pierremariotti@arm64-apple-darwin20 ABC_FEniCSx_classical % rm -rf ~/.cache/fenics
May thanks for your help… I really need to run again my FEniCSx codes..