bd-j / prospector

Python code for Stellar Population Inference from Spectra and SEDs
http://prospect.readthedocs.io
MIT License
153 stars 71 forks source link

I can import prospect #300

Closed dolaver closed 7 months ago

dolaver commented 8 months ago

Hello,

When I put import prospect I have the following problem

Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import prospect Traceback (most recent call last): File "", line 1, in File "/home/dolaver/.local/lib/python3.10/site-packages/prospect/init.py", line 6, in from . import models File "/home/dolaver/.local/lib/python3.10/site-packages/prospect/models/init.py", line 8, in from .sedmodel import ProspectorParams, SedModel, SpecModel File "/home/dolaver/.local/lib/python3.10/site-packages/prospect/models/sedmodel.py", line 17, in from .parameters import ProspectorParams File "/home/dolaver/.local/lib/python3.10/site-packages/prospect/models/parameters.py", line 15, in from .templates import describe File "/home/dolaver/.local/lib/python3.10/site-packages/prospect/models/templates.py", line 281, in info = np.genfromtxt(os.path.join(SPS_HOME, 'data', 'emlines_info.dat'), File "/usr/lib/python3.10/posixpath.py", line 76, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not NoneType

Could you help me solve it?

bd-j commented 8 months ago

It looks like you may not have a python-FSPS installation, or that SPS_HOME is not set. I'll make some changes so this is not required. However, in the meantime you might try installing FSPS (it is anyway required to fit stellar populations with prospector)

installation instructions for python-FSPS are at https://python-fsps.readthedocs.io/en/latest/installation/

bd-j commented 7 months ago

assuming this is resolved and closing, but please reopen if you still have trouble installing/importing