ARVE-Research / gwgen

A global WGEN-like weather generator
Other
21 stars 6 forks source link

building 'gwgen._parseghcnrow' extension error: extension 'gwgen._parseghcnrow' has Fortran sources but no Fortran compiler found #1

Open abhrajeetsarder opened 5 years ago

abhrajeetsarder commented 5 years ago

I don't know that how to fix it? Running installation by pip :: pip install gwgen Error Showing that :: `Collecting gwgen Using cached https://files.pythonhosted.org/packages/15/98/2261cacc3e5cd15f73fa3df6d6b1f895fd653098ee8f835f9dc413ca6936/gwgen-1.0.1.tar.gz Requirement already satisfied: f90nml in c:\python27\lib\site-packages (from gwgen) (1.0.2) Requirement already satisfied: psyplot in c:\python27\lib\site-packages (from gwgen) (1.2.0) Requirement already satisfied: scipy in c:\python27\lib\site-packages (from gwgen) (1.2.0) Requirement already satisfied: sqlalchemy in c:\python27\lib\site-packages (from gwgen) (1.2.17) Requirement already satisfied: psycopg2 in c:\python27\lib\site-packages (from gwgen) (2.7.7) Requirement already satisfied: statsmodels in c:\python27\lib\site-packages (from gwgen) (0.9.0) Requirement already satisfied: docrep in c:\python27\lib\site-packages (from gwgen) (0.2.5) Requirement already satisfied: model-organization in c:\python27\lib\site-packages (from gwgen) (0.1.10) Requirement already satisfied: xarray in c:\python27\lib\site-packages (from gwgen) (0.11.3) Requirement already satisfied: six in c:\python27\lib\site-packages (from gwgen) (1.12.0) Requirement already satisfied: PyYAML in c:\python27\lib\site-packages (from psyplot->gwgen) (3.13) Requirement already satisfied: funcargparse in c:\python27\lib\site-packages (from psyplot->gwgen) (0.2.0) Requirement already satisfied: matplotlib in c:\python27\lib\site-packages (from psyplot->gwgen) (2.2.3) Requirement already satisfied: numpy>=1.8.2 in c:\python27\lib\site-packages (from scipy->gwgen) (1.15.2) Requirement already satisfied: fasteners in c:\python27\lib\site-packages (from model-organization->gwgen) (0.14.1) Requirement already satisfied: pandas>=0.19.2 in c:\python27\lib\site-packages (from xarray->gwgen) (0.23.4) Requirement already satisfied: python-dateutil>=2.1 in c:\python27\lib\site-packages (from matplotlib->psyplot->gwgen) (2.7.5) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\python27\lib\site-packages (from matplotlib->psyplot->gwgen) (2.3.0) Requirement already satisfied: pytz in c:\python27\lib\site-packages (from matplotlib->psyplot->gwgen) (2018.7) Requirement already satisfied: backports.functools-lru-cache in c:\python27\lib\site-packages (from matplotlib->psyplot->gwgen) (1.5) Requirement already satisfied: cycler>=0.10 in c:\python27\lib\site-packages (from matplotlib->psyplot->gwgen) (0.10.0) Requirement already satisfied: kiwisolver>=1.0.1 in c:\python27\lib\site-packages (from matplotlib->psyplot->gwgen) (1.0.1) Requirement already satisfied: monotonic>=0.1 in c:\python27\lib\site-packages (from fasteners->model-organization->gwgen) (1.5) Requirement already satisfied: setuptools in c:\python27\lib\site-packages (from kiwisolver>=1.0.1->matplotlib->psyplot->gwgen) (39.0.1) Building wheels for collected packages: gwgen Running setup.py bdist_wheel for gwgen ... error Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\subhra~1\appdata\local\temp\pip-install-yimuko\gwgen\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d c:\users\subhra~1\appdata\local\temp\pip-wheel-b9alou --python-tag cp27: running bdist_wheel running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building extension "gwgen._parseghcnrow" sources f2py options: [] adding 'build\src.win-amd64-2.7\build\src.win-amd64-2.7\gwgen\fortranobject.c' to sources. adding 'build\src.win-amd64-2.7\build\src.win-amd64-2.7\gwgen' to include_dirs. adding 'build\src.win-amd64-2.7\gwgen_parseghcnrow-f2pywrappers2.f90' to sources. building extension "gwgen._parseeecra" sources f2py options: ['only:', 'parse_file', 'extract_data', ':'] adding 'build\src.win-amd64-2.7\build\src.win-amd64-2.7\gwgen\fortranobject.c' to sources. adding 'build\src.win-amd64-2.7\build\src.win-amd64-2.7\gwgen' to include_dirs. adding 'build\src.win-amd64-2.7\gwgen_parseeecra-f2pywrappers2.f90' to sources. building data_files sources build_src: building npy-pkg config files running build_py creating build\lib.win-amd64-2.7 creating build\lib.win-amd64-2.7\gwgen copying .\gwgen\evaluation.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\main.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\parameterization.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\parseghcnrow.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\parse_eecra.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\preproc.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\sensitivity_analysis.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\utils.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen__init__.py -> build\lib.win-amd64-2.7\gwgen running build_ext customize MSVCCompiler customize MSVCCompiler using build_ext get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']' customize GnuFCompiler Could not locate executable g77 Could not locate executable f77 customize IntelVisualFCompiler Could not locate executable ifort Could not locate executable ifl customize AbsoftFCompiler Could not locate executable f90 customize CompaqVisualFCompiler Could not locate executable DF customize IntelItaniumVisualFCompiler Could not locate executable efl customize Gnu95FCompiler Could not locate executable gfortran Could not locate executable f95 customize G95FCompiler Could not locate executable g95 customize IntelEM64VisualFCompiler customize IntelEM64TFCompiler Could not locate executable efort Could not locate executable efc customize PGroupFlangCompiler don't know how to compile Fortran code on platform 'nt' warning: build_ext: f77_compiler=None is not available.

building 'gwgen._parseghcnrow' extension error: extension 'gwgen._parseghcnrow' has Fortran sources but no Fortran compiler found


Failed building wheel for gwgen Running setup.py clean for gwgen Failed to build gwgen Installing collected packages: gwgen Running setup.py install for gwgen ... error Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\subhra~1\appdata\local\temp\pip-install-yimuko\gwgen\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\subhra~1\appdata\local\temp\pip-record-izyqxv\install-record.txt --single-version-externally-managed --compile: running install running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building extension "gwgen._parseghcnrow" sources f2py options: [] adding 'build\src.win-amd64-2.7\build\src.win-amd64-2.7\gwgen\fortranobject.c' to sources. adding 'build\src.win-amd64-2.7\build\src.win-amd64-2.7\gwgen' to include_dirs. adding 'build\src.win-amd64-2.7\gwgen_parseghcnrow-f2pywrappers2.f90' to sources. building extension "gwgen._parseeecra" sources f2py options: ['only:', 'parse_file', 'extract_data', ':'] adding 'build\src.win-amd64-2.7\build\src.win-amd64-2.7\gwgen\fortranobject.c' to sources. adding 'build\src.win-amd64-2.7\build\src.win-amd64-2.7\gwgen' to include_dirs. adding 'build\src.win-amd64-2.7\gwgen_parseeecra-f2pywrappers2.f90' to sources. building data_files sources build_src: building npy-pkg config files running build_py creating build\lib.win-amd64-2.7 creating build\lib.win-amd64-2.7\gwgen copying .\gwgen\evaluation.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\main.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\parameterization.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\parseghcnrow.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\parse_eecra.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\preproc.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\sensitivity_analysis.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen\utils.py -> build\lib.win-amd64-2.7\gwgen copying .\gwgen__init__.py -> build\lib.win-amd64-2.7\gwgen running build_ext customize MSVCCompiler customize MSVCCompiler using build_ext get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']' customize GnuFCompiler Could not locate executable g77 Could not locate executable f77 customize IntelVisualFCompiler Could not locate executable ifort Could not locate executable ifl customize AbsoftFCompiler Could not locate executable f90 customize CompaqVisualFCompiler Could not locate executable DF customize IntelItaniumVisualFCompiler Could not locate executable efl customize Gnu95FCompiler Could not locate executable gfortran Could not locate executable f95 customize G95FCompiler Could not locate executable g95 customize IntelEM64VisualFCompiler customize IntelEM64TFCompiler Could not locate executable efort Could not locate executable efc customize PGroupFlangCompiler don't know how to compile Fortran code on platform 'nt' warning: build_ext: f77_compiler=None is not available.

building 'gwgen._parseghcnrow' extension
error: extension 'gwgen._parseghcnrow' has Fortran sources but no Fortran compiler found

----------------------------------------

Command "c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\subhra~1\appdata\local\temp\pip-install-yimuko\gwgen\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\subhra~1\appdata\local\temp\pip-record-izyqxv\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\subhra~1\appdata\local\temp\pip-install-yimuko\gwgen`

Can someone help for fixing this problem?

Chilipp commented 5 years ago

Dear @abhrajeetsarder, sorry for coming back to you so late. The error message says no Fortran compiler found so you have to install gfortran on your computer. It comes with gcc. If you are using conda, conda install gcc should work, otherwise on Linux sudo apt install gcc and on OSX you can install it with xcode-select --install. Does this solve your problems?