F2PY cannot find intel fortran compiler on windows 7

一笑奈何 提交于 2019-12-09 02:53:34

After some further experimentation, I was able to resolve the issue and am posting the steps that worked in case it may help others with similar problems.

  1. f2py can now find Intel Fortran after setting the path to C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\ia32 and rebooting
  2. However, after this, I received an error stating: "error unable to find vcvarsall.bat". This is the batch file with configuration settings for the Microsoft c++ for Python 2.7 runtime mentioned above. As I gathered from other posts, this is a bug in Python 2.7.11 that I was able to correct by editing the msvc9compiler.py file in the main (not numpy) distutils folder. Specifically, I hardcoded the path to this file as such in line 267:

    def query_vcvarsall(version, arch="x86"):
    """Launch vcvarsall.bat and read the settings from its environment  """
        vcvarsall = find_vcvarsall(version)
        vcvarsall =  "C:/Users/mshippen/AppData/Local/Programs/Common/Microsoft/Visual C++ for Python/9.0/vcvarsall.bat"
        interesting = set(("include", "lib", "libpath", "path"))
        result = {}
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!