Theano fails to compile (OS X Monterey 12.3; Xcode 13.3; Intel)

Hi all,
I am new to PyMC and tried to install it for the first time. I create a conda environment with the command:
conda create -c conda-forge -n pymc3_env python=3.9 pymc3 theano-pymc mkl mkl-service

The conda installation works fine. I can import pymc3 fine.
However, starting implementing a model like:

with pm.Model() as model:
   ...:     beta = pm.Normal("beta", mu=0, tau=0.001)

I get the error:

Exception: ("Compilation failed (return status=1): ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64. clang-12: error: linker command failed with exit code 1 (use -v to see invocation). ", 'FunctionGraph(Elemwise{true_div,no_inplace}(TensorConstant{1.0}, TensorConstant{0.001}))')

I tried adding a $CPATH as in suggested in here but to effect.

Pymc 3.11.4
OSX 12.3 (2019 Intel Macbook pro)
Xcode 13.3 (so this covers the command lines xcode-select install)
conda 4.12.0
python 3.9.7

Thank you in advance for your help! I am out of option at the moment…

1 Like

Welcome!

Please see this issue. I think the solution is to use PyMC v4 (a beta version is currently available) instead.

That seems to work, thanks!

1 Like