clawpack / pyclaw

PyClaw is a Python-based interface to the algorithms of Clawpack and SharpClaw. It also contains the PetClaw package, which adds parallelism through PETSc.
http://www.clawpack.com/pyclaw
BSD 3-Clause "New" or "Revised" License
164 stars 99 forks source link

Issue with installation #716

Closed stefgeorgiadis96 closed 1 month ago

stefgeorgiadis96 commented 10 months ago

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]

× 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.

mandli commented 10 months 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.

ketch commented 10 months ago

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:

https://github.com/fxcoudert/gfortran-for-macOS/releases

cpraveen commented 10 months ago

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.