# Error in installing pymc3 on Windows10

**URL:** <https://discourse.pymc.io/t/error-in-installing-pymc3-on-windows10/6918>\
**Category:** Questions\
**Created:** [March 6, 2021, 7:14am UTC](https://discourse.pymc.io/t/error-in-installing-pymc3-on-windows10/6918 "2021-03-06T07:14:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jstanley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/jstanley/32/3711_2.png) [@jstanley](https://discourse.pymc.io/u/jstanley)\
**Post date:** [March 6, 2021, 7:14am UTC](https://discourse.pymc.io/t/error-in-installing-pymc3-on-windows10/6918/1 "2021-03-06T07:14:11Z")

</div>

I’m attempting to install the latest pymc3 version on a new computer (running Windows10) using conda, and it seems a lot more difficult than on a linux machine. I created a new environment:

`conda create --name pymc3_env`

After activating the environment, I ran the standard installation line:

```auto
conda install -c conda-forge pymc3

```

After the installation completed, to test the install I launched python, imported pymc3, and ran a test model, which produced the following error:

```auto
(pymc3_env) C:\Users\Jacob>python
Python 3.9.2 | packaged by conda-forge | (default, Feb 21 2021, 04:59:43) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymc3 as pm
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
>>> with pm.Model() as m:
... a = pm.Uniform('a', lower=1, upper=10)
... samps = pm.sample(100)
...

 You can find the C code in this temporary file: C:\Users\Jacob\AppData\Local\Temp\theano_compilation_error_n3urv09_
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\pymc3\distributions\distribution.py", line 121, in __new__
    dist = cls.dist(*args, **kwargs)
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\pymc3\distributions\distribution.py", line 130, in dist
    dist. __init__ (*args, **kwargs)
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\pymc3\distributions\continuous.py", line 228, in __init__
    self.mean = (upper + lower) / 2.0
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\theano\tensor\var.py", line 101, in __add__
    return theano.tensor.basic.add(self, other)
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\theano\graph\op.py", line 253, in __call__
    compute_test_value(node)
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\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:\Users\Jacob\miniconda3\envs\pymc3_env\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:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\theano\graph\op.py", line 600, in make_c_thunk
    outputs = cl.make_thunk(
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\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:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\theano\link\c\basic.py", line 1138, in __compile__
    thunk, module = self.cthunk_factory(
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\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:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\theano\link\c\cmodule.py", line 1191, in module_from_key
    module = lnk.compile_cmodule(location)
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\theano\link\c\basic.py", line 1543, in compile_cmodule
    module = c_compiler.compile_str(
  File "C:\Users\Jacob\miniconda3\envs\pymc3_env\lib\site-packages\theano\link\c\cmodule.py", line 2546, in compile_str
    raise Exception(
Exception: ('Compilation failed (return status=1): C:\\Users\\Jacob\\AppData\\Local\\Theano\\compiledir_Windows-10-10.0.19041-SP0-Intel64_Family_6_Model_61_Stepping_4_GenuineIntel-3.9.2-64\\tmptp4jf1fd\\mod.cpp:2:20: fatal error: iostream: No such file or directory\r. compilation terminated.\r. ', 'FunctionGraph(Elemwise{add,no_inplace}(TensorConstant{10.0}, TensorConstant{1.0}))')

```

So it appears to be some C/Theano issue. It seem to be in the same realm as these earlier posts ([Install PyMC3 and Theano Windows 10](https://discourse.pymc.io/t/install-pymc3-and-theano-windows-10/4260)), however I’ve tried all the suggestions in that thread and none of them solved the problem. I’m wondering does this have to do with the change from theano to theano-pymc? Is there a clear process for installing pymc3 on Windows 10?

---

<div class="post-metadata">

**Author:** ![fonnesbeck](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/fonnesbeck/32/13_2.png) [@fonnesbeck](https://discourse.pymc.io/u/fonnesbeck)\
**Post date:** [March 6, 2021, 3:20pm UTC](https://discourse.pymc.io/t/error-in-installing-pymc3-on-windows10/6918/2 "2021-03-06T15:20:30Z")

</div>

Can you try following the [install instructions for Windows that we have on our wiki](https://github.com/pymc-devs/pymc3/wiki/Installation-Guide-(Windows))? Let us know if it still does not work

---

<div class="post-metadata">

**Author:** ![michaelosthege](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/michaelosthege/32/371_2.png) [@michaelosthege](https://discourse.pymc.io/u/michaelosthege)\
**Post date:** [March 6, 2021, 4:39pm UTC](https://discourse.pymc.io/t/error-in-installing-pymc3-on-windows10/6918/3 "2021-03-06T16:39:25Z")

</div>

It looks like you ended up with `theano` instead of `theano-pymc`.

Which `pymc3` version did conda install for you? The latest version is `3.11.1` and it pins on `theano-pymc ==1.1.2`, also in the conda-forge recipe: [pymc3-feedstock/meta.yaml at master · conda-forge/pymc3-feedstock · GitHub](https://github.com/conda-forge/pymc3-feedstock/blob/master/recipe/meta.yaml#L29)  
I don’t know why conda did not respect that in your case.

The Windows instructions in the Wiki that Chris linked should work! Please let me know if the don’t.

---

<div class="post-metadata">

**Author:** ![jstanley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/jstanley/32/3711_2.png) [@jstanley](https://discourse.pymc.io/u/jstanley)\
**Post date:** [March 6, 2021, 6:48pm UTC](https://discourse.pymc.io/t/error-in-installing-pymc3-on-windows10/6918/4 "2021-03-06T18:48:57Z")

</div>

Yep, worked like a charm! Not sure how I missed that install guide on the wiki. Thanks for the help @fonnesbeck @michaelosthege.

---

<div class="post-metadata">

**Author:** ![Gonzalo\_Castro](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/gonzalo_castro/32/4449_2.png) [@Gonzalo\_Castro](https://discourse.pymc.io/u/Gonzalo_Castro)\
**Post date:** [September 24, 2021, 7:45pm UTC](https://discourse.pymc.io/t/error-in-installing-pymc3-on-windows10/6918/5 "2021-09-24T19:45:05Z")

</div>

Hi, I am facing a compilation problem when running pymc3 code in pycharm. I have seen other posts addressing this issue ([https://youtrack.jetbrains.com/issue/PY-49742](https://youtrack.jetbrains.com/issue/PY-49742)) but nothing that has been suggested solves it, at least for me. Any chance someone here has any ideas?
