keflavich / pyradex

Python interface to RADEX
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

Installation error #42

Open tjtakys opened 1 year ago

tjtakys commented 1 year ago

Hi to everybody,

I failed several times in installing pyradex. My PC is a Ubuntu 22.04.3 LTS and the software versions are as follows. ~/software/pyradex$ python -c "import sys, astropy, numpy; print(sys.version); print(numpy.__version__,astropy.__version__)" 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0] 1.26.0 5.3.4 ~/software/pyradex$ gfortran --version GNU Fortran (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. After having installed astroquery and specutils, I cloned pyradex from the repository. Then I run "python setup.py install_radex install", but the installation is interrupted by this message:

~/software/pyradex$ python setup.py install_radex install /home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/setuptools/dist.py:314: InformationOnly: Normalizing '0.4.2dev' to '0.4.2.dev0' self.metadata.version = self._normalize_version( Downloading RADEX Download succeeded, or at least didn't obviously fail. Extracting RADEX source from file /home/tsujita/.astropy/cache/download/url/df9a6b344f9b6851d8c799789754b74e/contents Reading fortran codes... Reading file 'slatec.f' (format:fix,strict) Traceback (most recent call last): File "/home/tsujita/software/pyradex/setup.py", line 120, in setup(name='pyradex', File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/tsujita/software/pyradex/setup.py", line 44, in run install_radex.install_radex() File "/home/tsujita/software/pyradex/install_radex.py", line 25, in install_radex compile_radex() File "/home/tsujita/software/pyradex/install_radex.py", line 137, in compile_radex f2py.run_main(' -h radex.pyf --overwrite-signature'.split()+include_path.split()+files) File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/numpy/f2py/f2py2e.py", line 462, in run_main postlist = callcrackfortran(files, options) File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/numpy/f2py/f2py2e.py", line 363, in callcrackfortran postlist = crackfortran.crackfortran(files) File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/numpy/f2py/crackfortran.py", line 3355, in crackfortran readfortrancode(files, crackline) File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/numpy/f2py/crackfortran.py", line 552, in readfortrancode dowithline(finalline) File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/numpy/f2py/crackfortran.py", line 858, in crackline analyzeline(m, pat[1], line) File "/home/tsujita/miniconda3/envs/pyradex/lib/python3.10/site-packages/numpy/f2py/crackfortran.py", line 1452, in analyzeline vtype = vars[v].get('typespec') KeyError: 'iparam(1)'

I can make radex as normal following the official radex homepage, so I suspect that the problem is associated with f2py. What can I do? Thank you for your help!

keflavich commented 1 year ago

I agree @aopikumin , f2py is almost certainly playing a role here. Can you report what numpy version you're using?

I am not sure I'll be able to debug this any time soon.

tjtakys commented 1 year ago

Thank you for your quick reply! I use numpy v1.26.0.

keflavich commented 6 months ago

I don't get this issue with numpy 1.23.5 on my redhat system or with 1.26.2 on my mac, both using python 3.10. This isn't super helpful, but at least it rules out some easy explanations.