Welcome, Guest
Username: Password: Remember me

TOPIC: Compilation failed with MacOS - Error during second part of f2py

Compilation failed with MacOS - Error during second part of f2py 1 month 2 weeks ago #46122

  • ltkhan3
  • ltkhan3's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello,
Currently I am using the following system:
python. : 3.9.13
numpy : 1.21.6
pip : 24.3.1
scikit-learn : 1.0.2
setuptools. : 75.8.0

GNU Fortran (Homebrew GCC 14.2.0_1) : 14.2.0

I tried to compile Telemac v8p3r0. The error reports:


Building the Python API
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~> Wrap_api built
~> Compiling Modules api
~> First part of f2py for api passed
Traceback (most recent call last):
File "/Users/lybakhan/opentelemac/scripts/python3/compilation/compil_tools.py", line 980, in compile_api_f2py
output = check_output(cmd, shell=True, stderr=STDOUT)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'f2py --quiet -c /Users/lybakhan/opentelemac/builds/gfortranHPC/wrap_api/lib/api.pyf --fcompiler=gnu95 --opt="" -I/Users/lybakhan/opentelemac/builds/gfortranHPC/wrap_api/include /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libapi.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libtelemac3d4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libtelemac2d4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libsisyphe4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libgaia4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libnestor4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libtomawac4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libartemis4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libkhione4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libwaqtel4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libgretel4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libpartel4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libbief4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libparallel4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libhermes4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libdamocles4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libspecial4api.a /Users/lybakhan/opentelemac/builds/gfortranHPC/lib/libmascaret.a -L$METISHOME/lib -lmetis --build-dir tmp_f2py' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/lybakhan/opentelemac/scripts/python3/compile_telemac.py", line 143, in <module>
main()
File "/Users/lybakhan/opentelemac/scripts/python3/compile_telemac.py", line 134, in main
compile_api_files(silent=not options.verbose,
File "/Users/lybakhan/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 "/Users/lybakhan/opentelemac/scripts/python3/compilation/compil_tools.py", line 982, in compile_api_f2py
raise TelemacException(\
utils.exceptions.TelemacException: Error during second part of f2py for api 1
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/bin/f2py", line 8, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 690, in main
run_compile()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 618, in run_compile
from numpy.distutils.system_info import get_info
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/distutils/system_info.py", line 196, in <module>
from numpy.distutils.command.config import config as cmd_config
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/distutils/command/config.py", line 19, in <module>
from numpy.distutils.mingw32ccompiler import generate_manifest
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/distutils/mingw32ccompiler.py", line 29, in <module>
from distutils.msvccompiler import get_build_version as get_build_msvc_version
ModuleNotFoundError: No module named 'distutils.msvccompiler'

lybakhan@Lybas-MacBook-Pro configs % /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 5042 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
Attachments:
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.