Import spectra issues
Closed this issue · 1 comments
I'm trying to use fake_spectra as a module rather than scripts, but am getting some import issues (pasted below) with relative imports. When I clone this repo, the cloudy_tables directory is empty. I cloned that repo separately and have it in my PYTHONPATH though
In [1]: import fake_spectra
In [2]: from fake_spectra import spectra as sp
ImportError Traceback (most recent call last)
in ()
----> 1 from fake_spectra import spectra as sp
/mnt/xfs1/home/landerson/.local/lib/python3.5/site-packages/fake_spectra/spectra.py in ()
35 from ._spectra_priv import _Particle_Interpolate, _near_lines
36
---> 37 from .cloudy_tables import convert_cloudy
38 def _get_cloudy_table(red, cdir=None):
39 """Get the cloudy table if we didn't already"""
ImportError: No module named 'fake_spectra.cloudy_tables'
You need to do "git submodule init && git submodule update" first.
Or (easiest) you can do pip install --user fake_spectra