# Problems with installation of PyMC4 on Windows

**URL:** https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902
**Category:** v5
**Created:** [November 25, 2022, 3:30pm UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902 "2022-11-25T15:30:36Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![thomash](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/thomash/32/5878_2.png) [@thomash](https://discourse.pymc.io/u/thomash)
#### Post date: [November 25, 2022, 3:30pm UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/1 "2022-11-25T15:30:36Z")

</div>

I followed the instructions on Installation of PyMC4, with

```auto
conda create -c conda-forge -n pymc_env "pymc>=4"
conda activate pymc_env

```

using Anaconda on Win11. However, I was NOT able to install PyMC4 AND JupyterLab/IPython. In contrast, installing PyMC3 worked smoothly.  
Since my other efforts to install a current version PyMC without Anaconda have not been successful, I was wondering if this problem has also occurred to other users?

---

<div class="post-metadata">

### Author: ![cluhmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/cluhmann/32/3083_2.png) [@cluhmann](https://discourse.pymc.io/u/cluhmann)
#### Post date: [November 25, 2022, 5:24pm UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/2 "2022-11-25T17:24:27Z")

</div>

Welcome!

Am I correct in understanding that you can successfully install pymc v4 but that you cannot then install JupyterLab/IPython? What errors are you getting when you install JupyterLab/IPython?

---

<div class="post-metadata">

### Author: ![thomash](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/thomash/32/5878_2.png) [@thomash](https://discourse.pymc.io/u/thomash)
#### Post date: [November 25, 2022, 8:53pm UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/3 "2022-11-25T20:53:53Z")

</div>

Yes, that is correct. I get the following behavior:  
“JupyterLab cannot be installed on this environment”

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pymc3/original/2X/4/403c481c349dcbd89a59ec2bca0acd78160ff345.png)

And when I create a new environment, I don’t have PyMC4 in the selection list.

---

<div class="post-metadata">

### Author: ![twiecki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/twiecki/32/6930_2.png) [@twiecki](https://discourse.pymc.io/u/twiecki)
#### Post date: [November 25, 2022, 9:33pm UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/4 "2022-11-25T21:33:05Z")

</div>

You can have a base environment from which you launch jupyter and then select the conda environment as a kernel: [How to add your Conda environment to your jupyter notebook in just 4 steps | by Noopur R K | Medium](https://medium.com/@nrk25693/how-to-add-your-conda-environment-to-your-jupyter-notebook-in-just-4-steps-abeab8b8d084)

---

<div class="post-metadata">

### Author: ![cluhmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/cluhmann/32/3083_2.png) [@cluhmann](https://discourse.pymc.io/u/cluhmann)
#### Post date: [November 25, 2022, 11:30pm UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/5 "2022-11-25T23:30:44Z")

</div>

Yup. Looks like you might be installing JupyterLab into a new environment. When you do that, conda will only install the packages necessary to get JupyterLab to work (which won’t include pymc). You just need to get pymc and JuypterLab installed in a single environment (the “base” environment would work).

---

<div class="post-metadata">

### Author: ![thomash](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/thomash/32/5878_2.png) [@thomash](https://discourse.pymc.io/u/thomash)
#### Post date: [November 27, 2022, 10:42am UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/6 "2022-11-27T10:42:40Z")

</div>

It looks there is an incompatability between the requirements of PyMC4 and of Jupyter. (Note that I am on a Win11 machine, and on Anaconda 2.3.2, which might not correspond to your spec).

- When I start an environment with Python 3.11, I have PyMC available for installation; but I cannot install the IPython kernel.
- In contrast, when I choose a Python version \< 3.11, I can install Python and Jupyter, but only have PyMC2 and PyMC3 available.

Can you please tell me what the requirements for PyMC4 are?  
Or do you suggest that I uninstall Anaconda, and give it a try with MiniForge?

PS: I looked at the link that you suggested at Medium, but also following the instructions there, I ran into the same compatability problems mentioned above.

---

<div class="post-metadata">

### Author: ![cluhmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/cluhmann/32/3083_2.png) [@cluhmann](https://discourse.pymc.io/u/cluhmann)
#### Post date: [November 27, 2022, 4:44pm UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/7 "2022-11-27T16:44:17Z")

</div>

Requirements are [here](https://github.com/pymc-devs/pymc/blob/main/requirements.txt). I do not believe that PyMC is being testeed on python 3.11, though I’m not sure that’s related. Are you using the [installation instructions](https://www.pymc.io/projects/docs/en/latest/installation.html) or attempting to install some other way?

---

<div class="post-metadata">

### Author: ![thomash](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/thomash/32/5878_2.png) [@thomash](https://discourse.pymc.io/u/thomash)
#### Post date: [November 28, 2022, 9:34am UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/8 "2022-11-28T09:34:35Z")

</div>

I followed the instructions there.

When I executed  
`conda create -c conda-forge -n pymc_env "pymc>=4"`  
as suggested, I got Python 3.11. Since Ipython and Jupyter are not installed by default, I followed up the installation (after activating the environment) with  
`conda install ipython`  
Here the first _“Package conflict”_ was reported.

So I tried  
`conda create -c conda-forge -n pymc_env_2 "pymc>=4"` “python\<3.11”  
After that, I could (after activating the corresponding environment) execute  
`conda install ipython`  
But  
`conda install jupyter`  
produced another _package conflict_.

The same happened when I tried  
`conda create -c conda-forge -n pymc_env_3 "pymc>=4"` “python\<3.10”

It would be extremely helpful if you could provide (in the docu) information over one combination that worked for you.

---

<div class="post-metadata">

### Author: ![aseyboldt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/aseyboldt/32/5795_2.png) [@aseyboldt](https://discourse.pymc.io/u/aseyboldt)
#### Post date: [November 29, 2022, 12:57am UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/9 "2022-11-29T00:57:40Z")

</div>

Could this be a conflict between the defaults channel of conda and the conda-forge channel?  
It it is, then `conda install -c conda-forge jupyter` should work.

---

<div class="post-metadata">

### Author: ![thomash](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/thomash/32/5878_2.png) [@thomash](https://discourse.pymc.io/u/thomash)
#### Post date: [November 30, 2022, 2:59pm UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/10 "2022-11-30T14:59:35Z")

</div>

Yes, that was the solution! Thank you very much for your support!

It might be worthwhile making a comment in  
https://www.pymc.io/projects/docs/en/latest/installation.html  
since a lot of information about PyMC is available as jupyter notebooks.

---

<div class="post-metadata">

### Author: ![cluhmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/cluhmann/32/3083_2.png) [@cluhmann](https://discourse.pymc.io/u/cluhmann)
#### Post date: [December 1, 2022, 3:18am UTC](https://discourse.pymc.io/t/problems-with-installation-of-pymc4-on-windows/10902/11 "2022-12-01T03:18:33Z")

</div>

I am looking into this.

I would also suggest (as I often do) the use of [mamba](https://mamba.readthedocs.io/en/latest/index.html) (which I believe uses conda-forge by default) or check out [micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html#micromamba). Each is a drop-in replacement for conda (but check the links to learn about the differences).
