fortran可执行文件在命令行中运行,但不能通过python脚本运行
我试图通过Python脚本运行一个Fortran可执行文件,但遇到了错误。我可以通过命令行运行可执行文件,但是当我在Spyder内运行此Python脚本时,它找不到某个文件。以下是我正在使用的代码行和输出错误:
process = subprocess.Popen(["./genex"])
错误:
dyld: Library not loaded: @rpath/libgfortran.3.dylib
Referenced from: /Users/Austin/tycho-1-14/run/./genex
Reason: image not found
编辑:
我找不到解决此特定问题的解决方案,但是我发现从命令行中运行Python脚本,而不是内部Spyder内部解决了问题。
I am trying to run a Fortran executable through a Python script but am getting an error. I can run the executable fine through the command line, but when I run this Python script inside Spyder it can't find a certain file. Below is the line of code I'm using and the output error:
process = subprocess.Popen(["./genex"])
error:
dyld: Library not loaded: @rpath/libgfortran.3.dylib
Referenced from: /Users/Austin/tycho-1-14/run/./genex
Reason: image not found
EDIT:
I did not find a solution to this particular problem, but I found that running the Python script from the command line instead of inside Spyder fixed the issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论