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

pls help run on windows 10 machine with anaconda python 2.7 #103

Open
Sandy4321 opened this issue Jun 16, 2016 · 3 comments
Open

pls help run on windows 10 machine with anaconda python 2.7 #103

Sandy4321 opened this issue Jun 16, 2016 · 3 comments

Comments

@Sandy4321
Copy link

the error is

c:\Sander\my_code\crosscat-master>
c:\Sander\my_code\crosscat-master>python examples/dha_example.py www/data/dha.csv --num_chains 2 --num_transitions 2
Traceback (most recent call last):
File "examples/dha_example.py", line 78, in
X_L_list, X_D_list = engine.initialize(M_c, M_r, T, get_next_seed(), initialization='from_the_prior', n_chains=num_chains)
File "C:\Anaconda\lib\site-packages\crosscat\LocalEngine.py", line 110, in initialize
make_get_next_seed(seed),
File "C:\Anaconda\lib\site-packages\crosscat\LocalEngine.py", line 62, in get_initialize_arg_tuples
seeds = [get_next_seed() for seed_idx in range(n_chains)]
File "C:\Anaconda\lib\site-packages\crosscat\LocalEngine.py", line 908, in
return lambda: generator.next()
File "C:\Anaconda\lib\site-packages\crosscat\utils\general_utils.py", line 95, in int_generator
for _ in xrange(2**62):
OverflowError: Python int too large to convert to C long

c:\Sander\my_code\crosscat-master>

@alxempirical
Copy link
Contributor

Hi, Sandy. As a temporary workaround, try editing line 95 of C:\Anaconda\lib\site-packages\crosscat\utils\general_utils.py so that the argument to xrange is 2**31, or perhaps a smaller value.

@riastradh-probcomp
Copy link
Contributor

Why not just change for _ in xrange(2**62) to while True?

@alxempirical
Copy link
Contributor

You're right, that's a better solution. Can't remember why I wrote it that way.

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

3 participants