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

import error #303

Closed woodwm closed 6 months ago

woodwm commented 7 months ago

I tried the latest stable version and the development version. Both give me the same error message.

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
....../generate_train_seds_NMF.ipynb Cell 4 line 5
      3 from sedpy.observate import load_filters
      4 import prospect
----> 5 from prospect.sources.constants import cosmo #WMAP9
      6 import exspect
      7 import sys

File ~/.conda/envs/move/lib/python3.10/site-packages/prospect/sources/__init__.py:1
----> 1 from .galaxy_basis import *
      2 from .ssp_basis import *
      3 from .star_basis import *

File ~/.conda/envs/move/lib/python3.10/site-packages/prospect/sources/galaxy_basis.py:5
      2 import numpy as np
      3 from copy import deepcopy
----> 5 from .ssp_basis import SSPBasis
      6 from ..utils.smoothing import smoothspec
      7 from .constants import cosmo, lightspeed, jansky_cgs, to_cgs_at_10pc

File ~/.conda/envs/move/lib/python3.10/site-packages/prospect/sources/ssp_basis.py:5
      2 import numpy as np
      3 from numpy.polynomial.chebyshev import chebval
----> 5 from ..utils.smoothing import smoothspec
      6 from .constants import cosmo, lightspeed, jansky_cgs, to_cgs_at_10pc
      8 try:

ModuleNotFoundError: No module named 'prospect.utils.smoothing'; 'prospect.utils' is not a package
bd-j commented 7 months ago

I can't reproduce. Maybe try explicitly uninstalling any old versions (e.g. python -m pip uninstall astro-prospector). Are you installing to a conda environment using pip, or some other method?

bd-j commented 6 months ago

Assuming this is resolved, but feel free to re-open if you are still having difficulty importing.