Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with installation #716

Open
stefgeorgiadis96 opened this issue Jan 24, 2024 · 3 comments
Open

Issue with installation #716

stefgeorgiadis96 opened this issue Jan 24, 2024 · 3 comments

Comments

@stefgeorgiadis96
Copy link

stefgeorgiadis96 commented Jan 24, 2024

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.

@mandli
Copy link
Member

mandli commented Jan 24, 2024

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
Copy link
Member

ketch commented Jan 30, 2024

I found someone had a similar issue here:

mesonbuild/meson#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
Copy link

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.

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

No branches or pull requests

4 participants