命令f2py不工作uPython 3.8 windows 7 x64?

z5btuh9x  于 2021-08-25  发布在  Java
关注(0)|答案(0)|浏览(186)

帮助:命令f2py不工作upython3.8windows7x64?
我安装了mingw64和python64位
我有错误消息:python38.dll返回非零退出状态1。
帮助:命令f2py不工作upython3.8windows7x64?
我安装了mingw64和python64位
我有错误消息:python38.dll返回非零退出状态1。

subroutine test(n, a)
    implicit none
    integer, intent(in)                   :: n
    integer, dimension(n), intent(out)    :: a
    integer                               :: i

    do i = 1,n
         if (i.eq.1) then
            a(i) = 0
         elseif (i.eq.2) then
            a(i) = 1
         else
            a(i) = a(i-1) + a(i-2)
         endif
    enddo
end subroutine test
C:\Users\houidef\Desktop\myf>f2py  -c -m --fcompiler=gnu95 test.f90
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler opti
ons
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler opt
ions
running build_src
build_src
building extension "test.f90" sources
build_src: building npy-pkg config files
running build_ext
Looking for python38.dll
Building import library (arch=AMD64): "c:\users\houidef\appdata\local\programs\p
ython\python38\libs\libpython38.a" (from c:\users\houidef\appdata\local\programs
\python\python38\python38.dll)
objdump.exe: c:\users\houidef\appdata\local\programs\python\python38\python38.dl
l: File format not recognized
Traceback (most recent call last):
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\runpy.py", l
ine 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\runpy.py", l
ine 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\houidef\AppData\Local\Programs\Python\Python38\Scripts\f2py.exe
\__main__.py", line 7, in <module>
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\f2py\f2py2e.py", line 690, in main
    run_compile()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\f2py\f2py2e.py", line 657, in run_compile
    setup(ext_modules=[ext])
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\core.py", line 169, in setup
    return old_setup(**new_attr)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\co
re.py", line 148, in setup
    dist.run_commands()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\di
st.py", line 966, in run_commands
    self.run_command(cmd)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\di
st.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\command\build.py", line 61, in run
    old_build.run(self)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\co
mmand\build.py", line 135, in run
    self.run_command(cmd_name)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\cm
d.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\di
st.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\command\build_ext.py", line 135, in run
    self.compiler = new_compiler(compiler=compiler_type,
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\ccompiler.py", line 761, in new_compiler
    compiler = klass(None, dry_run, force)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 97, in __init__
    build_import_library()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 411, in build_import_library
    return _build_import_library_amd64()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 467, in _build_import_library_amd64

    generate_def(dll_file, def_file)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 293, in generate_def
    dump = dump_table(dll)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 285, in dump_table
    st = subprocess.check_output(["objdump.exe", "-p", dll])
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\subprocess.p
y", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\subprocess.p
y", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['objdump.exe', '-p', 'c:\\users\\houide
f\\appdata\\local\\programs\\python\\python38\\python38.dll']' returned non-zero
 exit status 1.

C:\Users\houidef\Desktop\myf>f2py  -c -m --fcompiler=gnu95 test.f90 > error.txt
objdump.exe: c:\users\houidef\appdata\local\programs\python\python38\python38.dl
l: File format not recognized
Traceback (most recent call last):
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\runpy.py", l
ine 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\runpy.py", l
ine 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\houidef\AppData\Local\Programs\Python\Python38\Scripts\f2py.exe
\__main__.py", line 7, in <module>
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\f2py\f2py2e.py", line 690, in main
    run_compile()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\f2py\f2py2e.py", line 657, in run_compile
    setup(ext_modules=[ext])
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\core.py", line 169, in setup
    return old_setup(**new_attr)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\co
re.py", line 148, in setup
    dist.run_commands()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\di
st.py", line 966, in run_commands
    self.run_command(cmd)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\di
st.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\command\build.py", line 61, in run
    old_build.run(self)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\co
mmand\build.py", line 135, in run
    self.run_command(cmd_name)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\cm
d.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\distutils\di
st.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\command\build_ext.py", line 135, in run
    self.compiler = new_compiler(compiler=compiler_type,
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\ccompiler.py", line 761, in new_compiler
    compiler = klass(None, dry_run, force)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 97, in __init__
    build_import_library()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 411, in build_import_library
    return _build_import_library_amd64()
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 467, in _build_import_library_amd64

    generate_def(dll_file, def_file)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 293, in generate_def
    dump = dump_table(dll)
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\site-package
s\numpy\distutils\mingw32ccompiler.py", line 285, in dump_table
    st = subprocess.check_output(["objdump.exe", "-p", dll])
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\subprocess.p
y", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "c:\users\houidef\appdata\local\programs\python\python38\lib\subprocess.p
y", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['objdump.exe', '-p', 'c:\\users\\houide
f\\appdata\\local\\programs\\python\\python38\\python38.dll']' returned non-zero
 exit status 1.

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题