# wrong version installed with conda

**URL:** <https://mne.discourse.group/t/wrong-version-installed-with-conda/6158>\
**Category:** Support & Discussions\
**Tags:** installation\
**Created:** [January 7, 2023, 6:14pm UTC](https://mne.discourse.group/t/wrong-version-installed-with-conda/6158 "2023-01-07T18:14:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam54000](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sam54000/32/2152_2.png) [@Sam54000](https://mne.discourse.group/u/Sam54000)\
**Post date:** [January 7, 2023, 6:14pm UTC](https://mne.discourse.group/t/wrong-version-installed-with-conda/6158/1 "2023-01-07T18:14:31Z")

</div>

Hi, first of all Happy New year to everyone and may you find health and success in this new year.  
Secondly, thank you very much for this amazing tool which is mne.

I ran into some issues recently with the plotting:  
when I do `raw.plot()`, the signal is plotted into a matplotlib window instead of the nice MNE BROWSER. I spent a lot of time trying to troubleshoot by checking:

- If the right matplotlib backend is called (Qt5Agg)
- If I have the right Qt version (Qt5)
- If the right PyQt is installed (PyQt5)
- If I have mne-qt-browser is installed (checked through the conda verbose during the install)
- When using iPython I tryied the magic commands %gui qt, %matplotlib qt
- Tried different text editors (VIM, VS code)

and I ended up reinstalling mne, miniconda, Qt etc…  
But nothing

When I run `raw.plot()` I can see this message:  
`<ipython-input-3-41bfa3401378>:199: RuntimeWarning: Setting non-standard config type: "MNE_BROWSER_BACKEND" mne.set_config('MNE_BROWSER_BACKEND', 'qt5')`

I noticed that everytime I installed mne with miniconda or mamba when I run `mne --version` it shows `MNE 0.23.dev0 `.

And when I run `mne.sys_info()` I get:

Platform: Windows-10-10.0.19044-SP0  
Python: 3.10.8 | packaged by conda-forge | (main, Nov 22 2022, 08:16:33) [MSC v.1929 64 bit (AMD64)]  
Executable: c:\Users\Sam19\miniconda3\envs\mne\python.exe  
CPU: Intel64 Family 6 Model 85 Stepping 7, GenuineIntel: 20 cores  
Memory: 63.7 GB

mne: 0.23.dev0  
numpy: 1.23.5 {blas=NO\_ATLAS\_INFO, lapack=lapack}  
scipy: 1.10.0  
matplotlib: 3.6.2 {backend=Qt5Agg}

sklearn: 1.2.0  
numba: 0.56.4  
nibabel: 4.0.2  
nilearn: 0.10.0  
dipy: 1.5.0  
cupy: Not found  
pandas: 1.5.2  
mayavi: Not found  
pyvista: 0.37.0 {pyvistaqt=0.9.0, OpenGL 4.5.0 NVIDIA 522.06 via Quadro RTX 4000/PCIe/SSE2}  
vtk:  
PyQt5: 5.15.7

as you can see I want MNE version 1.3.0 but I get the version 0.23.  
So I presumed that mne-qt-browser was not implemented in that version and that’s why I can’t plot correctly with mne-qt-browser.

The question is, how can I get the right version when installling mne with mamba or miniconda?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![mscheltienne](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mscheltienne/32/827_2.png) [@mscheltienne](https://mne.discourse.group/u/mscheltienne)\
**Post date:** [January 7, 2023, 7:02pm UTC](https://mne.discourse.group/t/wrong-version-installed-with-conda/6158/2 "2023-01-07T19:02:38Z")

</div>

Hello,

Indeed, the qt browser was added in 1.0.  
For the `RuntimeWarning`, the correct variable is `'qt'`. Thus, you should use `mne.set_config('MNE_BROWSER_BACKEND', 'qt')` if you want to set the browser to the qt backend in the configuration.

That said it’s definitely strange that you are showing the info for a 0.23.dev0 version. I would recommend to install MNE in a fresh conda environment:

```python
conda create --strict-channel-priority --channel=conda-forge --name=mne mne

```

Or with `mamba`:

```python
conda install --channel=conda-forge mamba
mamba create --override-channels --channel=conda-forge --name=mne mne

```

Or you can use the [installers](https://mne.tools/dev/install/installers.html#installers) that will setup an environment with most packages you need.

Note: I am not a heavy user of either conda or mamba, so I might have made a mistake in the commands.

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [January 7, 2023, 7:22pm UTC](https://mne.discourse.group/t/wrong-version-installed-with-conda/6158/3 "2023-01-07T19:22:37Z")

</div>

Hello @Sam54000, what’s the output of:

```python
import mne
print(mne. __file__ )

```

Thanks!

---

<div class="post-metadata">

**Author:** ![Sam54000](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sam54000/32/2152_2.png) [@Sam54000](https://mne.discourse.group/u/Sam54000)\
**Post date:** [January 7, 2023, 8:58pm UTC](https://mne.discourse.group/t/wrong-version-installed-with-conda/6158/4 "2023-01-07T20:58:44Z")

</div>

Thanks for your answers  
Yes I did re install several times by using either:  
`conda create --strict-channel-priority --channel=conda-forge --name=mne mne`

or

```python
conda install --channel=conda-forge mamba
mamba create --override-channels --channel=conda-forge --name=mne mne

```

I ran the command

```python
import mne 
print(mne. __file__ )

```

Here is the output:

`C:\Users\<username>\AppData\Roaming\Python\Python310\site-packages\mne\ __init__.py`

But in `site-packages` I also have a folder mne-0.23.dev0.dist-info. Should I remove it?

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [January 7, 2023, 10:39pm UTC](https://mne.discourse.group/t/wrong-version-installed-with-conda/6158/5 "2023-01-07T22:39:15Z")

</div>

> [@Sam54000](#):
>
> ```python
> import mne 
> print(mne. __file__ )
> 
> ```
> 
> Here is the output:
> 
> `C:\Users\<username>\AppData\Roaming\Python\Python310\site-packages\mne\ __init__.py`

This is what I suspected. This directory was probably created when you ran `pip install --user` some time ago.

This is a **huge** issue in Python. I’ve seen these “user installs” cause nothing but trouble – the symptom is always like what you’re describing here: inexplicable versions of a package suddenly surface. Unfortunately, until not-too-long-ago, this was the recommended way to install MNE and related packages (as per official docs).

In the MNE-Python standalone installers, we actually actively disable these “user packages”. This can be achieved by setting the environment variable `PYTHONNOUSERSITE` to `1`.

To do that, open your terminal / Anaconda prompt, activate your MNE environment, and type:

```shell
conda env config vars set PYTHONNOUSERSITE=1

```

The next time you activate the MNE environment, the variable will be automatically set, and the packages found in `...AppData\Roaming\` will be ignored – and your `conda`-installed MNE-Python will be used instead.

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![Sam54000](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sam54000/32/2152_2.png) [@Sam54000](https://mne.discourse.group/u/Sam54000)\
**Post date:** [January 8, 2023, 1:35am UTC](https://mne.discourse.group/t/wrong-version-installed-with-conda/6158/6 "2023-01-08T01:35:53Z")

</div>

Yes, I remember installing mne with pip some time ago.

I followed your instructions, it worked, great!  
Thanks so much for your help!

I am marking this as solved

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [January 8, 2023, 8:52am UTC](https://mne.discourse.group/t/wrong-version-installed-with-conda/6158/7 "2023-01-08T08:52:34Z")

</div>

> [@Sam54000](#):
>
> Yes, I remember installing mne with pip some time ago.

Just to be clear: using `pip` should normally give the expected results. The problem only arises when you use (or have previously used) the `--user` switch when running `pip`.

Glad to hear it’s working for you now!

Richard
