Problems with the code of SED fitter

Hello, I’ve been trying to replicate the example in the SED Fitter documentation, but when i run the code, appear this error and i can’t find a way to fix it`

import os
import glob

from astropy import units as u

from sedfitter import (fit, plot, plot_params_1d, plot_params_2d,
                       write_parameters, write_parameter_ranges)
from sedfitter.extinction import Extinction

this is where the error appears,

ImportError                               Traceback (most recent call last)
<ipython-input-10-26a25f6b9253> in <module>
      4 from astropy import units as u
      5 
----> 6 from sedfitter import (fit, plot, plot_params_1d, plot_params_2d,
      7                        write_parameters, write_parameter_ranges)
      8 from sedfitter.extinction import Extinction

~\anaconda3\lib\site-packages\sedfitter\__init__.py in <module>
      3 
      4 from .fit import *
----> 5 from .plot import *
      6 from .plot_params_1d import *
      7 from .plot_params_2d import *

~\anaconda3\lib\site-packages\sedfitter\plot.py in <module>
     29 
     30 from .fit_info import FitInfoFile
---> 31 from .sed import SED
     32 from .sed.cube import SEDCube
     33 from .utils import io

~\anaconda3\lib\site-packages\sedfitter\sed\__init__.py in <module>
      2 
      3 from .sed import *
----> 4 from .cube import *

~\anaconda3\lib\site-packages\sedfitter\sed\cube.py in <module>
      4 from astropy import units as u
      5 from astropy.io import fits
----> 6 from astropy.extern import six
      7 from astropy.table import Table
      8 

ImportError: cannot import name 'six' from 'astropy.extern' (C:\Users\52222\anaconda3\lib\site-packages\astropy\extern\__init__.py)

can some of you could tell me what i’m doing wrong?

It seems like sedfitter expects there to be a distribution of (I assume) the six module available under the astropy.extern subpackage. Chances are you’re having fun (it is absolutely no fun :neutral_face:) with versioning, just double check what versions sedfitter supports (if it’s out of date you may need to dig around a bit).

1 Like