jbirky / apogee_tools

Modeling tools for SDSS/APOGEE spectra
http://apogee-tools.readthedocs.io/
MIT License
2 stars 3 forks source link

Problem importing apogee_tools #20

Closed ElizabethMorh closed 6 years ago

ElizabethMorh commented 6 years ago

input: import apogee_tools as ap

Output: Traceback (most recent call last): File "", line 1, in File "/Users/Elizabeth/python/apogee_tools/apogee_tools/init.py", line 5, in from .cannon_tools.run_cannon import labelToSpec, loadLabels, initializeTrainingSet, runCannon, crossValidate File "/Users/Elizabeth/python/apogee_tools/apogee_tools/cannon_tools/run_cannon.py", line 360 nlabels = len(labels)

jbirky commented 6 years ago

I pushed some changes (rewrote labelToSpect, added a function, and removed syntax errors) for run_cannon.py, and it works now for me. Can you try it again?

ElizabethMorh commented 6 years ago

I tried, but now it says:


ModuleNotFoundError Traceback (most recent call last)

in () ----> 1 import apogee_tools as ap /Users/Elizabeth/python/apogee_tools/apogee_tools/__init__.py in () 1 from __future__ import absolute_import, division, print_function, unicode_literals 2 ----> 3 from .core import Spectrum 4 5 from .cannon_tools.run_cannon import labelToSpec, loadLabels, initializeTrainingSet, synthesizeFlux, runCannon, crossValidate ModuleNotFoundError: No module named 'apogee_tools.core'
jbirky commented 6 years ago

Hm, I am not sure... It is working on my computer, and I've pushed all of my files. Did you pull the code after I posted the last message?

ElizabethMorh commented 6 years ago

Now it's working! I did pull the code again and now it's solved.

Thank you!

jbirky commented 6 years ago

Ok good!