Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acor function not showing up in module -- anaconda python 3.3 #4

Closed
astronomeralex opened this issue Aug 5, 2014 · 5 comments
Closed

Comments

@astronomeralex
Copy link

I've successfully installed acor, but when I try to use it as directed, python throws an error and doesn't think the function acor is in the acor module.

import acor
import numpy as np
a = np.random.rand(500)
acor(a)
Traceback (most recent call last):
File "", line 1, in
TypeError: 'module' object is not callable

I'm using clang, and python 3.3 via anaconda

@astronomeralex
Copy link
Author

sorry, and this error, too.

acor.acor(a)
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'acor'

dfm added a commit that referenced this issue Aug 5, 2014
@dfm
Copy link
Owner

dfm commented Aug 5, 2014

I just pushed a change. Works for me in 3.4 now. Try using the GitHub version and see if it works for you.

P.S. the most recent version of emcee includes a pure Python version of acor that is probably better for most problems. See the docs and consider giving it a try.

astronomeralex pushed a commit to astronomeralex/acor that referenced this issue Aug 5, 2014
@astronomeralex
Copy link
Author

Well, I get a different error now. progress! I forked and downloaded the new version and used python setup.py install. Also, the emcee acor seems useful.

In [1]: import acor

ImportError Traceback (most recent call last)
in ()
----> 1 import acor

/astro/grads/arh5361/code/acor/acor/init.py in ()
7 """
8
----> 9 from .acor import *
10

/astro/grads/arh5361/code/acor/acor/acor.py in ()
3 import numpy as np
4
----> 5 from . import _acor
6
7

ImportError: cannot import name _acor

@dfm
Copy link
Owner

dfm commented Aug 5, 2014

you need to run

python setup.py build_ext --inplace

or

python setup.py install

first.

@astronomeralex
Copy link
Author

thanks, everything works now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants