dfm / george

Fast and flexible Gaussian Process regression in Python
http://george.readthedocs.io
MIT License
445 stars 128 forks source link

pip ValueError #23

Closed benjaminpope closed 7 years ago

benjaminpope commented 9 years ago

Installed via sudo pip install george. No problem when I manually installed from source, but got this for the pip version:

In [1]: import george

ImportError Traceback (most recent call last)

in () ----> 1 import george /usr/local/lib/python2.7/dist-packages/george/**init**.py in () 11 **all** = ["kernels", "GP", "BasicSolver", "HODLRSolver"] 12 ---> 13 from . import kernels 14 from .gp import GP 15 from .basic import BasicSolver /usr/local/lib/python2.7/dist-packages/george/kernels.py in () 16 from functools import partial 17 ---> 18 from ._kernels import CythonKernel 19 from .utils import numerical_gradient 20 ImportError: No module named _kernels
dfm commented 9 years ago

This should work now. Thanks for this!

dr-guangtou commented 9 years ago

Hi! I just tried to install George using the source code, got no error during the installation, but got the same error when I tried to import it; Don't know if I did anything wrong?

Installed /Users/songhuang/anaconda/lib/python2.7/site-packages/george-0.2.1-py2.7-macosx-10.5-x86_64.egg Processing dependencies for george==0.2.1 Finished processing dependencies for george==0.2.1 . . .

In [5]: import george

ImportError Traceback (most recent call last)

in () ----> 1 import george /Users/songhuang/dropbox/work/temp/python/dfm_george/george/**init**.py in () 11 **all** = ["kernels", "GP", "BasicSolver", "HODLRSolver"] 12 ---> 13 from . import kernels 14 from .gp import GP 15 from .basic import BasicSolver /Users/songhuang/dropbox/work/temp/python/dfm_george/george/kernels.py in () 16 from functools import partial 17 ---> 18 from ._kernels import CythonKernel 19 from .utils import numerical_gradient 20 ImportError: No module named _kernels
dfm commented 9 years ago

Are you still in the source directory when you're trying to import? In that case, the local module will override the installed one.