keflavich / pyradex

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

Installation problems #21

Closed jdhenshaw closed 6 years ago

jdhenshaw commented 6 years ago

Seems to fail at the first hurdle. Problem seems to be with f2py? Although it is installed via numpy (can import using `from numpy import f2py')...

Traceback (most recent call last):
  File "setup.py", line 137, in <module>
    'install_fjdu': InstallFjdu,
  File "/Users/henshaw/opt/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Users/henshaw/opt/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Users/henshaw/opt/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 44, in run
    install_radex.install_radex()
  File "/Users/henshaw/Dropbox/Work/Code/GitHub/pyradex/install_radex.py", line 22, in install_radex
    compile_radex()
  File "/Users/henshaw/Dropbox/Work/Code/GitHub/pyradex/install_radex.py", line 148, in compile_radex
    raise SystemError("f2py failed with error %i" % r2)
SystemError: f2py failed with error 1

python -c "import sys, astropy, numpy; print(sys.version); print(numpy.__version__,astropy.__version__)"

3.6.5 |Anaconda custom (64-bit)| (default, Mar 29 2018, 13:14:23) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
1.15.2 3.0.3

gcc --version
gcc (GCC) 7.1.0
Copyright (C) 2017 Free Software Foundation, Inc.

gfortran --version
GNU Fortran (GCC) 7.1.0
Copyright (C) 2017 Free Software Foundation, Inc
keflavich commented 6 years ago

Does f2py work on its own?

On Thu, Oct 4, 2018 at 2:27 AM jdhenshaw notifications@github.com wrote:

Seems to fail at the first hurdle. Problem seems to be with f2py? Although it is installed via numpy (can import using `from numpy import f2py')...

Traceback (most recent call last): File "setup.py", line 137, in 'install_fjdu': InstallFjdu, File "/Users/henshaw/opt/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/Users/henshaw/opt/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/Users/henshaw/opt/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "setup.py", line 44, in run install_radex.install_radex() File "/Users/henshaw/Dropbox/Work/Code/GitHub/pyradex/install_radex.py", line 22, in install_radex compile_radex() File "/Users/henshaw/Dropbox/Work/Code/GitHub/pyradex/install_radex.py", line 148, in compile_radex raise SystemError("f2py failed with error %i" % r2) SystemError: f2py failed with error 1

python -c "import sys, astropy, numpy; print(sys.version); print(numpy. version,astropy.version)"

3.6.5 |Anaconda custom (64-bit)| (default, Mar 29 2018, 13:14:23) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] 1.15.2 3.0.3

gcc --version gcc (GCC) 7.1.0 Copyright (C) 2017 Free Software Foundation, Inc.

gfortran --version GNU Fortran (GCC) 7.1.0 Copyright (C) 2017 Free Software Foundation, Inc

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/keflavich/pyradex/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIxYxFtLKckUVBLIpGGIGpcgbp50xdNks5uhcZ8gaJpZM4XHmzW .

-- Adam Ginsburg Jansky fellow, National Radio Astronomy Observatory http://www.adamgginsburg.com/

jdhenshaw commented 6 years ago

yeh, I can import it. Haven't got anything to do much testing with it mind you...

keflavich commented 6 years ago

OK. I don't know what 'error 1' is. If you can find any fortran file to try to compile, it would be helpful to know if f2py works....

Unfortunately, f2py is mostly just a box of magic to me, I don't really know how to debug it. I did use it successfully for another project yesterday though, so it still work.

On Thu, Oct 4, 2018 at 8:01 AM jdhenshaw notifications@github.com wrote:

yeh, I can import it. Haven't got anything to do much testing with it mind you...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/keflavich/pyradex/issues/21#issuecomment-427030298, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIxY3gG7JoocTUXRL9tVKlX8qA-sOPLks5uhhSjgaJpZM4XHmzW .

-- Adam

jdhenshaw commented 6 years ago

okay, I've tried to compile some of the functions in the pyradex/myRadex folder - seems fine. Crashes at f.write(source) but presumably that's because I'm not using the function correctly (I'm literally just using f2py.compile('./whatevs.f')?

jdhenshaw commented 6 years ago

unless I'm using it in completely the wrong way - which is entirely likely....

keflavich commented 6 years ago

might be gcc. I'm on 4.8.5, you're on 7.1.0....

jdhenshaw commented 6 years ago

Fixed!

Problem solved by installing GCC and gfortran (https://anaconda.org/anaconda/gfortran_osx-64) via conda.