How to successfully install pymc3 on windows 10 64 bits?

Viewed 54

To begin with, I have followed up the instruction of the installation guide and deploy the new virtual environment with the yml file presented over that page, but I still met with the same problem as I executed the following codes. I have tried out many ways to solve the problem, please assist me to solve the problem.

Plus, I have referred to the issues on the official pymc3 website, but the problem still existed.

The reproducible example:

import pymc3 as pm
import numpy as np
import pandas as pd
import scipy.stats as stats
from datetime import datetime
import theano.tensor as T

early = 10
late = 12
y = np.r_[np.random.poisson(early, 25), np.random.poisson(late, 75)]
      
niter = 10000
t = range(len(y))
with pm.Model() as change_point:
    cp = pm.DiscreteUniform('change_point', lower=0, upper=len(y), testval=len(y)//2)
    mu0 = pm.Exponential('mu0', 1/y.mean())
    mu1 = pm.Exponential('mu1', 1/y.mean())
    mu = T.switch(t < cp, mu0, mu1)
    Y_obs = pm.Poisson('Y_obs', mu=mu, observed=y)
    trace = pm.sample(niter)
pm.traceplot(trace, varnames=['change_point', 'mu0', 'mu1'])

Here is the error reports:

[You can find the C code in this temporary file: C:\Users\Mick\AppData\Local\Temp\theano_compilation_error_xk8zcr1g
Traceback (most recent call last):

  File "C:\....py", line 48, in <module>
    mu = T.switch(t < cp, mu0, mu1)

  File "C:\...\lib\site-packages\theano\tensor\var.py", line 41, in __gt__
    rval = theano.tensor.basic.gt(self, other)

  File "C:\...\lib\site-packages\theano\graph\op.py", line 253, in __call__
    compute_test_value(node)

  File "C:\...\lib\site-packages\theano\graph\op.py", line 126, in compute_test_value
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])

  File "C:\...\lib\site-packages\theano\graph\op.py", line 634, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)

  File "C:\...\lib\site-packages\theano\graph\op.py", line 600, in make_c_thunk
    outputs = cl.make_thunk(

  File "C:\...\lib\site-packages\theano\link\c\basic.py", line 1203, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(

  File "C:\...\lib\site-packages\theano\link\c\basic.py", line 1138, in __compile__
    thunk, module = self.cthunk_factory(

  File "C:\...\lib\site-packages\theano\link\c\basic.py", line 1634, in cthunk_factory
    module = get_module_cache().module_from_key(key=key, lnk=self)

  File "C:\...\lib\site-packages\theano\link\c\cmodule.py", line 1191, in module_from_key
    module = lnk.compile_cmodule(location)

  File "C:\...\lib\site-packages\theano\link\c\basic.py", line 1543, in compile_cmodule
    module = c_compiler.compile_str(

  File "C:\...\lib\site-packages\theano\link\c\cmodule.py", line 2546, in compile_str
    raise Exception(

Exception: ('Compilation failed (return status=1): C:\\...\\AppData\\Local\\Temp\\ccujaONv.s: Assembler messages:\r. C:\\...\\AppData\\Local\\Temp\\ccujaONv.s:89: Error: invalid register for .seh_savexmm\r. ', 'FunctionGraph(Elemwise{gt,no_inplace}(<TensorType(int64, (True,))>, TensorConstant{[ 0  1  2 .. 97 98 99]}))')]
0 Answers
Related