如何让 setup.py 测试使用特定的 Fortran 编译器?

2024-01-07

我正在尝试测试package https://github.com/jsalvatier/scikits.bvp_solver其中包括一些 f90 文件。如果我构建或安装并指定 fortran 编译器,它就可以正常工作。但是,当我尝试测试时,出现以下错误:

C:\Users\jsalvatier\workspace\scikits.bvp_solver>python setup.py config_fc --fcompiler=gfortran test
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running test
running egg_info
running build_src
build_src
building extension "scikits.bvp_solver.bvp_solverf" sources
f2py options: []
  adding 'build\src.win32-2.6\fortranobject.c' to sources.
  adding 'build\src.win32-2.6' to include_dirs.
  adding 'build\src.win32-2.6\scikits\bvp_solver\lib\bvp_solverf-f2pywrappers2.f90' to sources.
building data_files sources
build_src: building npy-pkg config files
writing scikits.bvp_solver.egg-info\PKG-INFO
writing namespace_packages to scikits.bvp_solver.egg-info\namespace_packages.txt
writing top-level names to scikits.bvp_solver.egg-info\top_level.txt
writing dependency_links to scikits.bvp_solver.egg-info\dependency_links.txt
reading manifest file 'scikits.bvp_solver.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'scikits.bvp_solver.egg-info\SOURCES.txt'
running build_ext
customize Mingw32CCompiler
customize Mingw32CCompiler using build_ext
customize GnuFCompiler
Found executable C:\mingw\bin\g77.exe
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
Found executable C:\mingw\bin\g77.exe
customize GnuFCompiler
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
customize GnuFCompiler using build_ext
building 'scikits.bvp_solver.bvp_solverf' extension
compiling C sources
C compiler: gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes

compile options: '-Ibuild\src.win32-2.6 -IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -IC:\Python26\PC -c'
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Ibuild\src.win32-2.6 -IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -IC:\Python26\PC -c build\src.win32-2.6\scikits\bvp_solver\lib\bvp_solverfmodule.c -o build\temp.win32-2.6\Release\build\src.win32-2.6\scikits\bvp_solver\lib\bvp_solverfmodule.o
Found executable C:\mingw\bin\gcc.exe
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Ibuild\src.win32-2.6 -IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -IC:\Python26\PC -c build\src.win32-2.6\fortranobject.c -o build\temp.win32-2.6\Release\build\src.win32-2.6\fortranobject.o
compiling Fortran 90 module sources
XXX: module_build_dir='build\\temp.win32-2.6\\Release\\scikits\\bvp_solver' option ignored
XXX: Fix module_dir_switch for  GnuFCompiler
XXX: module_dirs=[] option ignored
XXX: Fix module_include_switch for  GnuFCompiler
Fortran f77 compiler: C:\mingw\bin\g77.exe -g -Wall -fno-second-underscore -mno-cygwin -O3 -funroll-loops
compile options: '-Ibuild\src.win32-2.6 -IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -IC:\Python26\PC -c'
error: f90 not supported by GnuFCompiler needed for scikits\bvp_solver\lib\BVP_M.f90

有办法解决这个问题吗?我使用的是 Windows 7、Python 2.6、numpy 1.4.1。


我认为问题在于“测试”命令需要就地构建。

python setup.py config --fcompiler=gfortran build_ext --inplace

产生了与之前相同的错误,但是

python setup.py config --fcompiler=gfortran build_ext

不是。

我能够通过以下方式解决这个问题

  1. 以交互方式运行设置 模式(python setup.py)

  2. 将 fortran 编译器设置为 gfortran

  3. 选择就地构建 (3)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何让 setup.py 测试使用特定的 Fortran 编译器? 的相关文章

随机推荐

  • Haskell 与 Prolog 的比较 [关闭]

    Closed 这个问题是基于意见的 help closed questions 目前不接受答案 Prolog 比 Haskell 能更好地解决哪些问题 这两种语言之间的主要区别是什么 Edit 是否有一个可以模仿 Prolog 功能的 Ha
  • 使用 Javascript/jQuery 打开选择?

    有没有办法使用 Javascript 和 jQuery 打开选择框
  • Rails:使用 will_paginate 每页显示 10 或 20 或 50 个结果如何?

    又是我 我需要使用 will paginate 插件在我的帖子列表中显示 10 或 20 或 50 个结果每页的结果数 你能帮我吗 Thanks 看起来OP也在这里问 http railsforum com viewtopic php id
  • iptables 转发和输入

    我有一个装有 Linux 电脑的家庭网络 所有电脑都运行着 iptables 我认为将我的 LAN 放在 Linux 网关 防火墙后面更容易 所以我在我的路由器和 LAN 之间放置了一台电脑 带有 fedora 没有 gui 并配置了 ip
  • Amazon S3 预签名 URL

    如果我将我的应用程序设置为生成用于访问 S3 媒体的预签名 URL 以便我可以将文件设置为私有 除非通过登录用户访问 那么如果有人有权访问 那么我这样说是否正确到 URL 在到期时间内 他们可以看到该文件 尽管它是 私有 的 因此 如果有人
  • 重载运算符和链接

    我有一个类 其中包含存储动态二维数组的对象 矩阵 我正在尝试重载 运算符 以便将 1 个矩阵复制到另一个矩阵上 以下作品 Square Matrix a b c a b 但是 这不起作用 a b c 它给了我以下错误1 与operator
  • QUANTEDA - 无效类“dfmSparse”对象

    我收到此警告消息 我使用这些数据 https github com kbenoit quanteda tree master data data char inaugural RData https github com kbenoit q
  • OpenCV 和 CMake 的链接问题

    我正在编写一个使用OpenCV的程序 安装在本地目录中 因为我在那台机器上没有root权限 并且我已经编写了相应的CMakeLists txt文件 我的问题是编译在链接阶段以不同的方式失败 我花了三个小时尝试了网上提出的所有不同的解决方案
  • 如何获取随机 json 数据并附加到 div 元素

    说这是我的 json imageSmall images employee jpgs employees abhishek 80x80 jpg imageBig images employee jpgs employees abhishek
  • 玩 securesocial - 开发者环境和单元测试

    我们在 Play 2 应用程序中使用 securesocial 模块进行身份验证 我有两个关于这个模块的问题 首先 有没有一种简单的方法可以禁用开发环境中的授权检查 最好不注释所有内容 SecureSocial SecuredAction注
  • 使用 Python 下载共享的 Google Drive 文件夹

    我的谷歌驱动器上有一个文件夹 其中只有 jpg 图像 我想使用该文件夹的共享链接将该文件夹中的所有图像下载到我的计算机上 到目前为止 我发现唯一有效的是下面的代码 但我只能让它适用于特定的共享文件 而不是整个文件夹 from google
  • 使用 TabItem 时如何将 TabLayout 与 ViewPager 同步

    我想用TabLayout with TabItem与以下代码
  • NuGet 包文件在构建期间未复制到项目内容

    我正在使用 VS2012 professional 和 NuGet Package Manager 版本 2 2 31210 构建 MVC4 Web 应用程序 我的解决方案中有多个项目 所有项目都共享我使用 NuGet 安装的各种包 我的项
  • 基于组件的MVC框架和基于动作的MVC框架

    您好 我曾使用过 JSF 它是一个基于组件的 MVC 框架 我知道很多 Web 项目都使用 Spring 作为其技术 而 Spring 属于 基于操作的 UI 框架 类别 我想知道这里有什么区别 哪一种更先进并为用户提供更多灵活性 一些优点
  • C 线程之间的消息传递

    我试图让线程 A 与线程 B 进行通信 我应该使用线程之间的消息传递来执行此操作 但我试图找到一些解释消息传递的示例源代码 有谁有一些解释消息传递的示例源代码 C 语言 的良好链接吗 虽然没有链接 但有很多方法可以实现这一点 首先是使用套接
  • C++中接口的多重继承

    我有一个对象接口和派生对象可能想要支持的开放式接口集合 An object class IObject getAttribute 0 A mutable object class IMutable setAttribute 0 A lock
  • 树的深度(哈斯克尔)

    我试图弄清楚如何计算 Haskell 中一般树的深度 我可以找出简单二叉树的解决方案 但不能找出具有任意数量叶子的一般树 这是我的二叉树代码 depth of a binary tree depth Tree a gt Int depth
  • Bootstrap 4 导航栏切换图标不出现

    Visit https jsfiddle net 8tpm4z00 https jsfiddle net 8tpm4z00 div class container div
  • 如何使用 React Native Stack Navigation 处理锁定方向

    我有一个在 iOS 和 Android 上运行的 React Native Expo 应用程序 使用具有两个视图的堆栈导航 第一个视图锁定为纵向屏幕方向 export class HomeScreen extends Component c
  • 如何让 setup.py 测试使用特定的 Fortran 编译器?

    我正在尝试测试package https github com jsalvatier scikits bvp solver其中包括一些 f90 文件 如果我构建或安装并指定 fortran 编译器 它就可以正常工作 但是 当我尝试测试时 出