keflavich / pyradex

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

Update requirements to numpy>=v1.20 #37

Closed autocorr closed 2 months ago

autocorr commented 2 years ago

I tracked down an installation error to the fact that my Anaconda environment's numpy was too old (v1.16) to be compatible with the f2py.compile call in install_radex.py. The current code requires a version of numpy with a version greater than or equal to v1.20 to use the full_output keyword argument ("New in v1.20.0" docs).

https://github.com/keflavich/pyradex/blob/722f9fdc45ff080cdcb151e37aa7075fab548f68/install_radex.py#L151-L155

For the web's sake, the specific error message is:

Traceback (most recent call last):
  File "setup.py", line 137, in <module>
    'install_fjdu': InstallFjdu,
  File "/users/bsvoboda/lustre/anaconda3/envs/main/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/users/bsvoboda/lustre/anaconda3/envs/main/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/users/bsvoboda/lustre/anaconda3/envs/main/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 44, in run
    install_radex.install_radex()
  File "/lustre/aoc/users/bsvoboda/temp/jadex/pyradex/install_radex.py", line 24, in install_radex
    compile_radex()
  File "/lustre/aoc/users/bsvoboda/temp/jadex/pyradex/install_radex.py", line 155, in compile_radex
    include_path),)
TypeError: compile() got an unexpected keyword argument 'full_output'

This shouldn't require any changes to the code, but perhaps the requirements.txt and/or pip-requirements.txt files should include a line for numpy>=1.20 because pyradex is incompatible with older versions.

keflavich commented 2 months ago

fixed (kinda) in fd1700b