Calificación:
  • 0 voto(s) - 0 Media
  • 1
  • 2
  • 3
  • 4
  • 5
f2py no funciona
#1
Actualmente instalado en windows 10,  miniconda con los paquetes numpy y matplotlib.
 por otro lado está instalado minGW versión GNU Fortran (tdm64-1) 5.1.0
 
 La versión de conda instalada es:  4.6.3
 a la hora de ejecutar f2py desde prompt de python sale el siguiente error:
  > f2py -c holaMundo.f90 -m holaMundo
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "holaMundo" sources
f2py options: []
f2py:> C:\...\src.win-amd64-3.7\holaMundomodule.c
creating C:\...\src.win-amd64-3.7
Reading fortran codes...
        Reading file 'holaMundo.f90' (format:free)
Traceback (most recent call last):
  File "C:\...\miniconda3\Scripts\\f2py.py", line 28, in <module>
    main()
  File "C:\...\miniconda3\lib\site-packages\numpy\f2py\f2py2e.py", line 648, in main run_compile()
  File "C:\...\miniconda3\lib\site-packages\numpy\f2py\f2py2e.py", line 633, in run_compile
    setup(ext_modules=[ext])
  File "C:\...\miniconda3\lib\site-packages\numpy\distutils\core.py", line 169, in setup
    return old_setup(**new_attr)
  File "C:\...\miniconda3\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\...\miniconda3\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\...\miniconda3\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\...\miniconda3\lib\site-packages\numpy\distutils\command\build.py", line 47, in run
    old_build.run(self)
  File "C:\...\miniconda3\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "C:\...\miniconda3\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\...\miniconda3\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\...\miniconda3\lib\site-packages\numpy\distutils\command\build_src.py", line 148, in run
    self.build_sources()
  File "C:\...\miniconda3\lib\site-packages\numpy\distutils\command\build_src.py", line 165, in build_sources
    self.build_extension_sources(ext)
  File "C:\...\miniconda3\lib\site-packages\numpy\distutils\command\build_src.py", line 327, in build_extension_sources
    sources = self.f2py_sources(sources, ext)
  File "C:\...\miniconda3\lib\site-packages\numpy\distutils\command\build_src.py", line 564, in f2py_sources
    ['-m', ext_name]+f_sources)
  File "C:\...\miniconda3\lib\site-packages\numpy\f2py\f2py2e.py", line 408, in run_main
    postlist = callcrackfortran(files, options)
  File "C:\...\miniconda3\lib\site-packages\numpy\f2py\f2py2e.py", line 329, in callcrackfortran
    postlist = crackfortran.crackfortran(files)
  File "C:\...\miniconda3\lib\site-packages\numpy\f2py\crackfortran.py", line 3246, in crackfortran
    readfortrancode(files, crackline)
  File "C:\...\miniconda3\lib\site-packages\numpy\f2py\crackfortran.py", line 537, in readfortrancode
    dowithline(finalline)
  File "C:\...\miniconda3\lib\site-packages\numpy\f2py\crackfortran.py", line 747, in crackline
    % (groupcounter))
Exception: crackline: groupcounter(=0) is nonpositive. Check the blocks.

Y no se genera ningún fichero... ¿que se puede hacer?
Gracias y Saludos
Responder
#2
Hola. No sé a que se debe el error, pero podrías revivir un reporte similar en GitHub: https://github.com/pearu/f2py/issues/43.

Saludos
Responder
#3
(18-02-2019, 09:26 PM)Francisco escribió: Hola. No sé a que se debe el error, pero podrías revivir un reporte similar en GitHub: https://github.com/pearu/f2py/issues/43.

Saludos

Gracias, pero no me ha servido.
Solo indica que se olvido poner el archivo detrás de -m, luego al otro enlace ya no hay acceso.
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)