User Instructions¶
All platforms need to be set up to compile the FORTRAN code in the source distribution.
I recommend that all platforms use gfortran , even Windows, in order to minimize the incompatibilities between different FORTRAN compilers.
Install Numpy¶
In addition, because f2py is part of the numpy package, all platforms will need numpy installed.
Therefore, the first user instruction is the command:
pip install numpy
OR perhaps...
pip install --upgrade numpy
Some Linux systems may require:
sudo pip install numpy
Install GFORTRAN¶
Both developers and users need to install gfortran and each operating system has its own approach.
Click: Install gfortran to see install instructions for a few platforms that I have tested.
Important
Windows users & developers MUST put MinGW into environment PATH variable. (see: Windows PATH)
C:MinGWmingw64bin OR C:MinGWmingw32bin
and
C:MinGWmingw64lib OR C:MinGWmingw32lib
Install Project¶
Once numpy and gfortran are available, the project can be installed with:
pip install genericf2py
... OR for your project ...
pip install <your project name>
and the project will be downloaded from PyPI, the FORTRAN will be compiled and the project installed.
Test Installation¶
After installing, GenericF2PY can be tested with the command line:
python -c "from genericf2py import main; main.main()"
It would be good to provide a similar simple test for your project.