Search code examples
pythonnumpyopensusef2py

F2PY not working on OpenSuse 42.3


I'm running OpenSuse 42.3, and I have installed numpy 1.13.1 using pip install numpy.

I run the command:

f2py -c PDFF.f -m PDFF

I get the error: error: file '/usr/lib64/python2.7/site-packages/numpy/f2py/src/fortranobject.c' does not exist

If I do an ls on that directory, there are no files in the /src directory of f2py. I had no issues when I was running on OpenSuse 13.2. We recently upgraded to 42.3.

Is this a known issue?


Solution

  • The version of pip that I was using is linked to Python3.4 by default. So all modules that I install using pip install' are added to the Python3.4 system directory. I did a zypper install python-pip, which added the pip module to the Python2.7 build on the system. I then ran sudo python -m pip install --upgrade numpy, and now the appropriate files have been added to the /src directory in the f2py utility for the Python2.7 build.