Closed stefgeorgiadis96 closed 1 month ago
The primary error is that your Fortran compiler does not seem to work. In principle you can use PyClaw without the Fortran compiler but I am not sure how the meson build handles that.
I found someone had a similar issue here:
https://github.com/mesonbuild/meson/issues/12282
They were also using homebrew to install gfortran, and it sounds like there is a bug with some particular version of gfortran. From the thread there, you could try doing
export LDFLAGS="$LDFLAGS -Wl,-ld_classic"
before the clawpack install. If that doesn't work, I suggest installing a different fortran compiler. I recommend using one from this site:
I have not had to do anything special on my macs. Probably I reinstalled gcc/gfortran from brew after the upgrade to clang15, you should try that.
You can also create a conda env, install gfortran via conda inside that env, and then pip install clawpack.
Hi, I'm trying to install clawpack using 'pip install clawpack' and I get the error message below. Do you know what might be wrong and how to fix it?
Collecting clawpack Using cached clawpack-5.9.2.tar.gz (5.8 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [13 lines of output]
meson setup /private/var/folders/58/zphccs7s5xl_p23crs7s7g2wn3yt1j/T/pip-install-1f0r90ia/clawpack_a299fda99b9546e98a80dfadec192755 /private/var/folders/58/zphccs7s5xl_p23crs7s7g2wn3yt1j/T/pip-install-1f0r90ia/clawpack_a299fda99b9546e98a80dfadec192755/.mesonpy-r40rmv2m -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/58/zphccs7s5xl_p23crs7s7g2wn3yt1j/T/pip-install-1f0r90ia/clawpack_a299fda99b9546e98a80dfadec192755/.mesonpy-r40rmv2m/meson-python-native-file.ini The Meson build system Version: 1.3.1 Source dir: /private/var/folders/58/zphccs7s5xl_p23crs7s7g2wn3yt1j/T/pip-install-1f0r90ia/clawpack_a299fda99b9546e98a80dfadec192755 Build dir: /private/var/folders/58/zphccs7s5xl_p23crs7s7g2wn3yt1j/T/pip-install-1f0r90ia/clawpack_a299fda99b9546e98a80dfadec192755/.mesonpy-r40rmv2m Build type: native build Program python3 found: YES (/Users/georgis/anaconda3/bin/python3) Project name: clawpack Project version: 5.9.2
../meson.build:1:0: ERROR: Compiler gfortran cannot compile programs.
A full log can be found at /private/var/folders/58/zphccs7s5xl_p23crs7s7g2wn3yt1j/T/pip-install-1f0r90ia/clawpack_a299fda99b9546e98a80dfadec192755/.mesonpy-r40rmv2m/meson-logs/meson-log.txt [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details.