2

我正在尝试在我的 Mac 上使用f2py 。当我输入f2py终端时,返回:

zacks-macbook-pro-2:~ zack$ f2py
Traceback (most recent call last):
  File "/usr/local/bin/f2py", line 5, in <module>
    pkg_resources.run_script('F2PY==2.45.241-1926', 'f2py')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 489, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1207, in run_script
    execfile(script_filename, namespace, namespace)
  File "/Library/Python/2.7/site-packages/F2PY-2.45.241_1926-py2.7.egg/EGG-INFO/scripts/f2py", line 3, in <module>
    import f2py2e
  File "/Library/Python/2.7/site-packages/F2PY-2.45.241_1926-py2.7.egg/f2py2e/__init__.py", line 10, in <module>
    import f2py2e
  File "/Library/Python/2.7/site-packages/F2PY-2.45.241_1926-py2.7.egg/f2py2e/f2py2e.py", line 26, in <module>
    import crackfortran
  File "/Library/Python/2.7/site-packages/F2PY-2.45.241_1926-py2.7.egg/f2py2e/crackfortran.py", line 1586
    as=b['args']
     ^
SyntaxError: invalid syntax

知道如何解决这个问题吗?我安装了 numpy 和 scipy。

4

0 回答 0