# Installing pymc3 on MacOS Big Sur

**URL:** <https://discourse.pymc.io/t/installing-pymc3-on-macos-big-sur/7179>\
**Category:** Questions\
**Created:** [April 5, 2021, 8:56am UTC](https://discourse.pymc.io/t/installing-pymc3-on-macos-big-sur/7179 "2021-04-05T08:56:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jessegm](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jessegm](https://discourse.pymc.io/u/jessegm)\
**Post date:** [April 5, 2021, 8:56am UTC](https://discourse.pymc.io/t/installing-pymc3-on-macos-big-sur/7179/1 "2021-04-05T08:56:23Z")

</div>

I recently got a new computer and am attempting to install pymc3 on my new machine. My computer is running Mac OS Big Sur 11.2.3.

I have attempted to follow all of the different recommendations and instructions provided here to successfully install pymc3. I’ve tried to do this using anaconda and that results in the following error given below. Additionally, I’ve tried instead installing it via pip install git+https://github.com/pymc-devs/pymc3 and get the error (ERROR: Command errored out with exit status 1: git clone -q [GitHub - pymc-devs/pymc3: Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with Aesara](https://github.com/pymc-devs/pymc3) /private/tmp/pip-req-build-deziwhha Check the logs for full command output.). I’ve even tried specifying which version of pymc3 to download, but that doesn’t seem to result in me successfully downloading pymc3, since afterwards, I’m unable to load it in python. Any help would be greatly appreciated!

* * *

You can find the C code in this temporary file: /var/folders/yf/fgkf\_qmj1slcrvy38bhy5lmr0000gn/T/theano\_compilation\_error\_xm60cn45  
Traceback (most recent call last):  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/gof/lazylinker\_c.py”, line 76, in   
raise ImportError(  
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force\_compile=False, \_need\_reload=True

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/gof/lazylinker\_c.py”, line 99, in   
raise ImportError(  
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force\_compile=False, \_need\_reload=True

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “”, line 1, in   
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/pymc3/ **init**.py”, line 39, in   
\_\_set\_compiler\_flags()  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/pymc3/ **init**.py”, line 33, in \_\_set\_compiler\_flags  
import theano  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/ **init**.py”, line 78, in   
from theano import scalar, tensor  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/scalar/ **init**.py”, line 1, in   
from .basic import \*  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/scalar/basic.py”, line 24, in   
from theano import config, gof, printing  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/printing.py”, line 19, in   
from theano.compile import Function, SharedVariable, debugmode  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/compile/ **init**.py”, line 1, in   
from theano.compile.debugmode import DebugMode  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/compile/debugmode.py”, line 27, in   
from theano.compile.mode import Mode, register\_mode  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/compile/mode.py”, line 10, in   
import theano.gof.vm  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/gof/vm.py”, line 697, in   
from . import lazylinker\_c  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/gof/lazylinker\_c.py”, line 139, in   
cmodule.GCC\_compiler.compile\_str(dirname, code, location=loc, preargs=args)  
File “/Users/jessegolden-marx/anaconda3/lib/python3.8/site-packages/theano/gof/cmodule.py”, line 2556, in compile\_str  
raise Exception(  
Exception: Compilation failed (return status=1): In file included from /Users/jessegolden-marx/.theano/compiledir\_macOS-10.16-x86\_64-i386-64bit-i386-3.8.5-64/lazylinker\_ext/mod.cpp:1:. In file included from /Users/jessegolden-marx/anaconda3/include/python3.8/Python.h:25:. /Users/jessegolden-marx/anaconda3/bin/…/include/c++/v1/stdio.h:107:15: fatal error: ‘stdio.h’ file not found. #include\_next \<stdio.h\>. ^ ~~~~~~~~. 1 error generated…

---

<div class="post-metadata">

**Author:** ![ckrapu](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/ckrapu/32/1366_2.png) [@ckrapu](https://discourse.pymc.io/u/ckrapu)\
**Post date:** [April 6, 2021, 8:03pm UTC](https://discourse.pymc.io/t/installing-pymc3-on-macos-big-sur/7179/2 "2021-04-06T20:03:15Z")

</div>

> [@jessegm](#):
>
> fatal error: ‘stdio.h’ file not found.

There’s some discussion [here](https://discourse.pymc.io/t/theano-problems-in-macos-catalina/4050/8) about how to solve this problem.

---

<div class="post-metadata">

**Author:** ![jessegm](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jessegm](https://discourse.pymc.io/u/jessegm)\
**Post date:** [April 7, 2021, 2:05am UTC](https://discourse.pymc.io/t/installing-pymc3-on-macos-big-sur/7179/3 "2021-04-07T02:05:22Z")

</div>

Thanks for sharing this. While I tried following these steps and installed xcode on my machine, the new version of Mac OS Big Sur doesn’t have a /usr/local/include folder. I’m not familiar with how to generate such a folder (since I get permission denied when I try to) or what the correct workaround would be. So, any advice on this (or other approaches to this installation problem) would be greatly appreciated.
