Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: raise CalledProcessError

raise CalledProcessError 2 years 1 month ago #41314

Hello all,

I am using Telemac v8p3r1 on windows 10.
I am trying to compile the API with the attached configure file but the following errors of "CalledProcessError: Command 'python -m numpy.f2py --build-dir" and "ValueError: Unknown MS Compiler version 1929" as shown in the following (errors are colored in red)
Building the Python API
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~> Wrap_api built
~> Compiling Modules api
~> First part of f2py for api passed
Traceback (most recent call last):
File "C:\opentelemac-mascaret\v8p3r1\scripts\python3\compilation\compil_tools.py", line 981, in compile_api_f2py
output = check_output(cmd, shell=True, stderr=STDOUT)
File "C:\Python310\lib\subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Python310\lib\subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'python -m numpy.f2py --build-dir tmp --quiet -c C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\wrap_api\lib\api.pyf --fcompiler=gnu95 --compiler=mingw32 --opt="-O3" -IC:\opentelemac-mascaret\v8p3r1\builds\win7gfors\wrap_api\include C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libapi.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libtelemac3d4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libtelemac2d4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libsisyphe4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libgaia4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libnestor4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libtomawac4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libartemis4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libkhione4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libwaqtel4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libgretel4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libpartel4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libbief4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libparallel4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libhermes4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libdamocles4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libspecial4api.a C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\lib\libmascaret.a --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 "C:\opentelemac-mascaret\v8p3r1\scripts\python3\compile_telemac.py", line 143, in <module>
main()
File "C:\opentelemac-mascaret\v8p3r1\scripts\python3\compile_telemac.py", line 134, in main
compile_api_files(silent=not options.verbose,
File "C:\opentelemac-mascaret\v8p3r1\scripts\python3\compilation\compil_tools.py", line 1035, in compile_api_files
compile_api_f2py('api', api_dir, source_api, skip_source, ld_flags,
File "C:\opentelemac-mascaret\v8p3r1\scripts\python3\compilation\compil_tools.py", line 983, in compile_api_f2py
raise TelemacException(\
utils.exceptions.TelemacException: Error during second part of f2py for api 1
analyzevars: charselector={'len': '40'} unhandled.
analyzevars: charselector={'len': '200'} unhandled.
analyzevars: charselector={'len': '40'} unhandled.
analyzevars: charselector={'len': '200'} unhandled.
analyzevars: charselector={'len': '40'} unhandled.
analyzevars: charselector={'len': '200'} unhandled.
analyzevars: charselector={'len': '40'} unhandled.
analyzevars: charselector={'len': '200'} unhandled.
analyzevars: charselector={'len': '40'} unhandled.
analyzevars: charselector={'len': '200'} unhandled.
analyzevars: charselector={'len': '32'} unhandled.
analyzevars: charselector={'len': '40'} unhandled.
analyzevars: charselector={'len': '200'} unhandled.
getstrlength:intent(hide): expected a string with defined length but got: {'typespec': 'character', 'charselector': {'*': '(*)'}, 'attrspec': [], 'intent': }
getstrlength:intent(hide): expected a string with defined length but got: {'typespec': 'character', 'charselector': {'*': '(*)'}, 'attrspec': [], 'intent': }
getstrlength:intent(hide): expected a string with defined length but got: {'typespec': 'character', 'charselector': {'*': '(*)'}, 'attrspec': [], 'intent': }
Traceback (most recent call last):
File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Python310\lib\site-packages\numpy\f2py\__main__.py", line 5, in <module>
main()
File "C:\Python310\lib\site-packages\numpy\f2py\f2py2e.py", line 702, in main
run_compile()
File "C:\Python310\lib\site-packages\numpy\f2py\f2py2e.py", line 669, in run_compile
setup(ext_modules=[ext])
File "C:\Python310\lib\site-packages\numpy\distutils\core.py", line 169, in setup
return old_setup(**new_attr)
File "C:\Python310\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python310\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python310\lib\site-packages\numpy\distutils\command\build.py", line 62, in run
old_build.run(self)
File "C:\Python310\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python310\lib\site-packages\numpy\distutils\command\build_ext.py", line 135, in run
self.compiler = new_compiler(compiler=compiler_type,
File "C:\Python310\lib\site-packages\numpy\distutils\ccompiler.py", line 780, in new_compiler
compiler = klass(None, dry_run, force)
File "C:\Python310\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 58, in __init__
distutils.cygwinccompiler.CygwinCCompiler.__init__ (self, verbose,
File "C:\Python310\lib\distutils\cygwinccompiler.py", line 155, in __init__
self.dll_libraries = get_msvcr()
File "C:\Python310\lib\distutils\cygwinccompiler.py", line 84, in get_msvcr
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
ValueError: Unknown MS Compiler version 1929

Can you please help me?
Attachments:
The administrator has disabled public write access.

raise CalledProcessError 2 years 1 month ago #41316

  • borisb
  • borisb's Avatar
  • OFFLINE
  • Admin
  • Posts: 128
  • Thank you received: 64
The parameter for f2py_name should only be f2py:
f2py_name: f2py
The administrator has disabled public write access.

raise CalledProcessError 2 years 1 month ago #41317

Thank you for your reply. Unfortunately, it didn't solve any of the two problems.

Any further suggestions?
The administrator has disabled public write access.

raise CalledProcessError 2 years 1 month ago #41319

  • borisb
  • borisb's Avatar
  • OFFLINE
  • Admin
  • Posts: 128
  • Thank you received: 64
Can you tell me which version of numpy is installed on your system using the following command:
pip show numpy
The administrator has disabled public write access.

raise CalledProcessError 2 years 1 month ago #41322

Version: 1.23.3
Name: numpy
Version: 1.23.3
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: www.numpy.org
Author: Travis E. Oliphant et al.
Author-email:
License: BSD
Location: c:\python310\lib\site-packages
Requires:
Required-by: pandas
The administrator has disabled public write access.

raise CalledProcessError 2 years 1 month ago #41324

  • borisb
  • borisb's Avatar
  • OFFLINE
  • Admin
  • Posts: 128
  • Thank you received: 64
Ok it should work with this version, could you post your PATH content?
The administrator has disabled public write access.

raise CalledProcessError 2 years 1 month ago #41329

User Variables PATH
C:\opentelemac-mascaret\python27\Lib\site-packages\numpy\distutils

system Variables PATH
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
C:\Program Files\cmake\bin;C:\opentelemac-mascaret\mingw64\bin;
C:\opentelemac-mascaret\mpich2\bin;C:\opentelemac-mascaret\mpich2\lib;
C:\Program Files\TortoiseSVN\bin;
C:\Program Files (x86)\Simply Fortran 3\mingw-w64\bin;
C:\Program Files (x86)\Simply Fortran 3\mingw-w64\x86_64-w64-mingw32\lib32;
C:\Program Files (x86)\Simply Fortran 3\mingw-w64\x86_64-w64-mingw32\lib64;
C:\opentelemac-mascaret\mpich2\include;
C:\Python310;
C:\Python310\Scripts;
C:\opentelemac-mascaret\v8p3r1\builds\win7gfors\bin;

User Variables PYTHONPATH
C:\opentelemac-mascaret\v8p3r1\builds\wing64mpi\lib
The administrator has disabled public write access.

raise CalledProcessError 2 years 1 month ago #41331

  • borisb
  • borisb's Avatar
  • OFFLINE
  • Admin
  • Posts: 128
  • Thank you received: 64
You need to remove your user PATH, it points to a Python 2.7 folder. You should probably remove your Python 2.7 directory too.
The administrator has disabled public write access.

raise CalledProcessError 2 years 1 month ago #41333

Thank you for your reply. I appreciate your patience with me.
I removed the path and Python 2.7 directory but still have exactly the same error.
Do you think there are any other possible sources of these errors?
The administrator has disabled public write access.

raise CalledProcessError 2 years 1 month ago #41339

  • borisb
  • borisb's Avatar
  • OFFLINE
  • Admin
  • Posts: 128
  • Thank you received: 64
I'm not sure about what is causing your issue with f2py. Could you post your list of Python packages using the following command:
pip list

Also, could you tell me which version of GFortran you are using:
gfortran --version
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: borisb

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