# Error when importing Matplotlib

**URL:** <https://discourse.slicer.org/t/error-when-importing-matplotlib/15860>\
**Category:** Support\
**Created:** [February 5, 2021, 4:50am UTC](https://discourse.slicer.org/t/error-when-importing-matplotlib/15860 "2021-02-05T04:50:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![11141](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/11141/32/9442_2.png) [@11141](https://discourse.slicer.org/u/11141)\
**Post date:** [February 5, 2021, 4:50am UTC](https://discourse.slicer.org/t/error-when-importing-matplotlib/15860/1 "2021-02-05T04:50:54Z")

</div>

Hi.  
I created a extension, but the following error occurred.

> Blockquote  
> Traceback (most recent call last):  
> File “”, line 1, in   
> File “C:\Users\20200\AppData\Local\NA-MIC\Slicer 4.11.20200930\lib\Python\Lib\imp.py”, line 170, in load\_source  
> module = \_exec(spec, sys.modules[name])  
> File “”, line 618, in \_exec  
> File “”, line 678, in exec\_module  
> File “”, line 219, in \_call\_with\_frames\_removed  
> File “C:/Users/20200/Desktop/Daehyeon/VXMController/VXMController.py”, line 18, in   
> import matplotlib.pyplot as plt  
> File “C:/Users/20200/anaconda3/envs/vxm/Lib/site-packages\matplotlib\pyplot.py”, line 36, in   
> import matplotlib.colorbar  
> File “C:/Users/20200/anaconda3/envs/vxm/Lib/site-packages\matplotlib\colorbar.py”, line 40, in   
> import matplotlib.artist as martist  
> File “C:/Users/20200/anaconda3/envs/vxm/Lib/site-packages\matplotlib\artist.py”, line 13, in   
> from .path import Path  
> File “C:/Users/20200/anaconda3/envs/vxm/Lib/site-packages\matplotlib\path.py”, line 18, in   
> from . import \_path, cbook  
> ImportError: cannot import name ‘\_path’

I think it can’t import the **.pyd** file when importing matplotlib.  
I’d really appreciate if you could help me solve this problem.

I use windows 10, 64bits OS , intel i9 CPU, 32GB RAM.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/5/05a29da4eed3d2dba6f720cda03e8ae0b8820aae.png)

---

<div class="post-metadata">

**Author:** ![pll\_llq](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pll_llq/32/9408_2.png) [@pll\_llq](https://discourse.slicer.org/u/pll_llq)\
**Post date:** [February 6, 2021, 5:43am UTC](https://discourse.slicer.org/t/error-when-importing-matplotlib/15860/2 "2021-02-06T05:43:04Z")

</div>

Why do you append the anaconda packages folded to sys.path?  
Are you sure that this anaconda environment is compatible with slicer?
