dfm / python-fsps

Python bindings to Charlie Conroy's Flexible Stellar Population Synthesis (FSPS) Fortran code
https://python-fsps.readthedocs.io
MIT License
65 stars 38 forks source link

I cannot install python-fsps #228

Closed yurinanakazato closed 1 year ago

yurinanakazato commented 1 year ago

First, I install fsps as follows,

cd ~
git clone https://github.com/cconroy20/fsps.git
export SPS_HOME="$HOME/fsps"
cd fsps/src
make clean
make all
./simple.exe

After that I did

cd ~
git clone https://github.com/dfm/python-fsps.git
cd python-fsps
python setup.py install

but I cannot install it. Here is the error message,

 Wrote C/API module "_fsps" to file "src/fsps/_fspsmodule.c"
          Fortran 90 wrappers are saved to "src/fsps/_fsps-f2pywrappers2.f90"
      ninja: build stopped: subcommand failed.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

My python version is 3.7. Could you tell me the correct way to install it? Thank you!

dfm commented 1 year ago

I think you forgot to copy the full output because there isn't any error reported, but there are a few issues that I can point you towards.

  1. We don't support Python 3.7 (neither does numpy!) so you'll probably need to upgrade Python (at least version 3.9 I think) or use an older version of python-fsps, which we can't help you with unfortunately.
  2. I'd recommend installing the official build from PyPI (using pip) unless you have a strong reason otherwise.
  3. Please look at the installation docs and note that you forgot the --recursive argument when cloning the repository, and you shouldn't use setup.py, using pip is still required for the dev version.

Hope this helps.

yurinanakazato commented 1 year ago

Thank you for your comment! I have updated python version to 3.9 and I was able to install python-fsps. I really appreciate your help.