j-faria / kima

Exoplanet detection in RVs with DNest4 and GPs
http://www.kima.science
MIT License
15 stars 10 forks source link

Why can't I import pykima? #33

Closed eggplantbren closed 6 years ago

eggplantbren commented 6 years ago

I've run python setup.py install and pykima seems to have been put in my site-packages correctly. However, I get a ModuleNotFoundError when I try to import it. Any idea why this would happen?

j-faria commented 6 years ago

Python 2 or 3? Assuming no typos, this can be an issue with sys.path not including the right path or worst case scenario a circular import. I'll try to debug it in the morning.

eggplantbren commented 6 years ago

Python 3.6.4 through Anaconda 5.1.0 (the latest version). I can import pykima if I'm in the same directory as setup.py, but not if I'm in another directory?

Would the sys.path thing affect other packages as well? Because DNest4's Python package (installed the same way) works fine.

Sorry I'm not very knowledgeable about Python environments and packages.

j-faria commented 6 years ago

The setup.py didn't actually specify the package it wanted to install, but Travis didn't catch this because I tested it in the same directory. It's fixed now, I think (you can do setup.py install again). Thank you for catching all these bugs!