I was just starting a new project, like I normally do, and tried installing pymc like this:
conda create -n multinom3 python=3.12 pymc=5.21.0 arviz jupyter -c conda-forge
This is on windows 11.
Note I pinned these versions only in later experiments when I could not get defaults to work either.
However when I try to run a simple model with this (any model) I get errors:
import pymc as pm
import numpy as np
import arviz as az
# Generate some fake data
np.random.seed(123)
data = np.random.normal(loc=5.0, scale=2.0, size=100)
with pm.Model() as model:
mu = pm.Normal("mu", mu=0, sigma=10)
sigma = pm.HalfNormal("sigma", sigma=10)
observed = pm.Normal("observed", mu=mu, sigma=sigma, observed=data)
trace = pm.sample(1000, tune=1000, cores =1)
Initializing NUTS using jitter+adapt_diag…
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: Cast{float64}(0)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last)
ETC ETC ETC
I tried various things like downgrading numpy but I just cannot get things to work. What is even stranger is that my existing environments I have used for other projects are working just fine using these same version numbers.
I also tried exporting an existing environment and recreating it from that (with everything pinned) and that does work. I am mystified.
Comparing exported environments, maybe this difference is what matters?
older working environment:
- vc=14.3=hbf610ac_24
- vc14_runtime=14.42.34438=hfd919c2_24
- vs2015_runtime=14.42.34438=h7142326_24
vs in broken environment
- vc=14.3=h2b53caa_26
- vc14_runtime=14.42.34438=hfd919c2_26
- vs2015_runtime=14.42.34438=h7142326_26
I.e. the 24 vs the 26? I am just grasping at straws here though. Anyone else run into something like this?