encountering an issue while compiling Telemac in Macbook 2024

The issue seems to occur while building python api.I sued homebrew to install Python version 3.9. Then I installed numpy version 2.0.2 with pip. The compilation fails with saying that, f2py3:command not found error. I have been trying to install telemac version v8p3r0 now. I also tried installing telemac version v8p4r0 with python versions 3.12, 3.11 but nothing worked. the full error message (

) is attached here with the pysource and config file.

pysourceandconfigfiles.zip (5.86 KB)

Any insights or solution would greatly appreciated.

I’m having the same issue when compiling telemac (tried v8.3, v8.4 and v8.5) on a linux cluster. I attached my cfg file here.

The python versions I use/have tried are 3.11.11 and 3.10.16.

Numpy: 1.21.6; 1.22.0; 1.23; 1.24; 1.26.4; 2.0.0; 2.0.2; 2.2.2

I also tried both “f2py_name : f2py” and “f2py_name : f2py3” in the cfg file

No luck in getting python api compiled so far…

Building the Python API




    ~> Wrap_api built

    ~> Generating the API Python wrapper

Traceback (most recent call last):

  File "/projects/illinois/eng/cee/mhgarcia/opentelemac/scripts/python3/compilation/compil_tools.py", line 954, in compile_api_f2py

    output = check_output(cmd, shell=True, stderr=STDOUT)

  File "/sw/apps/python/3.10.16/lib/[name removed]/subprocess.py", line 421, in check_output

    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,

  File "/sw/apps/python/3.10.16/lib/[name removed]/subprocess.py", line 526, in run

    raise CalledProcessError(retcode, process.args,

subprocess.CalledProcessError: Command 'f2py #f2py for new python and [name removed]/illinois/eng/cee/mhgarcia/opentelemac/builds/gfortranHPC/wrap_api/lib/api.pyf -m _api /projects/illinois/eng/cee/mhgarcia/opentelemac/builds/gfortranHPC/wrap_api/src/api_handle_var_t3d.f90 /projects/illinois/eng/cee/mhgarcia/opentelemac/builds/gfortranHPC/wrap_api/src/api_handle_var_t2d.f90 /projects/illinois/eng/cee/mhgarcia/opentelemac/builds/gfortranHPC/wrap_api/src/api_handle_var_art.f90 /projects/illinois/eng/cee/mhgarcia/opentelemac/builds/gfortranHPC/wrap_api/src/api_handle_var_wac.f90 /projects/illinois/eng/cee/mhgarcia/opentelemac/builds/gfortranHPC/wrap_api/src/api_handle_error.f90 /projects/illinois/eng/cee/mhgarcia/opentelemac/builds/gfortranHPC/wrap_api/src/api_interface.f90  skip: get_boolean_t2d_d get_double_t2d_d [name removed] get_var_size_t2d_d set_boolean_t2d_d set_double_t2d_d set_integer_t2d_d set_string_t2d_d get_double_array_t2d_d get_integer_array_t2d_d set_double_array_t2d_d set_integer_array_t2d_d [name removed] get_integer_t3d_d get_string_t3d_d get_var_size_t3d_d set_boolean_t3d_d set_double_t3d_d set_integer_t3d_d set_string_t3d_d get_double_array_t3d_d get_integer_array_t3d_d set_double_array_t3d_d set_integer_array_t3d_d get_boolean_art_d get_double_art_d get_integer_art_d get_string_art_d get_var_size_art_d set_boolean_art_d set_double_art_d set_integer_art_d set_string_art_d get_double_array_art_d get_integer_array_art_d set_double_array_art_d set_integer_array_art_d get_boolean_wac_d get_double_wac_d get_integer_wac_d get_string_wac_d get_var_size_wac_d set_boolean_wac_d set_double_wac_d set_integer_wac_d set_string_wac_d get_double_array_wac_d get_integer_array_wac_d set_double_array_wac_d set_integer_array_wac_d  :' returned non-zero exit status 127.



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

  File "/projects/illinois/eng/cee/mhgarcia/opentelemac/scripts/python3/compile_telemac.py", line 152, in <module>

    main()

  File "/projects/illinois/eng/cee/mhgarcia/opentelemac/scripts/python3/compile_telemac.py", line 144, in main

    compile_api_files(silent=not options.verbose,

  File "/projects/illinois/eng/cee/mhgarcia/opentelemac/scripts/python3/compilation/compil_tools.py", line 1034, in compile_api_files

    compile_api_f2py('api', api_dir, source_api, skip_source, ld_flags,

  File "/projects/illinois/eng/cee/mhgarcia/opentelemac/scripts/python3/compilation/compil_tools.py", line 956, in compile_api_f2py

    raise TelemacException(\

utils.exceptions.TelemacException: Error during the first part of F2PY: 127

/bin/sh: line 1: f2py: command not found

Since I suspected it’s a f2py issue, I did a test on f2py by having it compile a simple f90 script in python3 and it worked. The directory of numpy is in PYTHONPATH.

Any hint would be greatly appreciated! Thanks!

[name removed]

systel.campus.cfg (2.47 KB)
pysource.campus.sh.zip (987 Bytes)

A quick update- I successfully compiled telemac using anaconda with the same cfg file above. Python version is 3.13.1 and numpy = 2.2.2.

I removed the PYTHONPATH to the original python in the pysource…sh file (attached).

pysource.campus-conda.sh.zip (1000 Bytes)