# Error when installing matplotib in Slicer

**URL:** https://discourse.slicer.org/t/error-when-installing-matplotib-in-slicer/28138
**Category:** Support
**Tags:** python
**Created:** [March 2, 2023, 8:28am UTC](https://discourse.slicer.org/t/error-when-installing-matplotib-in-slicer/28138 "2023-03-02T08:28:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hapkx](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hapkx/32/18609_2.png) [@hapkx](https://discourse.slicer.org/u/hapkx)
#### Post date: [March 2, 2023, 8:28am UTC](https://discourse.slicer.org/t/error-when-installing-matplotib-in-slicer/28138/1 "2023-03-02T08:28:12Z")

</div>

Operating system: Windows11  
Slicer version: Slicer 5.0.2

Hi!  
I’m trying to install matplotlib package in python-interactor in Slicer 5.0.2 with the following commands:

```auto
from slicer.util import pip_install
pip_install("matplotlib")
import matplotlib.pyplot as plt

```

I get the following error:

```auto
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/matplotlib/
Could not fetch URL https://pypi.org/simple/matplotlib/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/matplotlib/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))) - skipping
ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)
ERROR: No matching distribution found for matplotlib
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))) - skipping
Traceback (most recent call last):
  File "D:/DESKTOP/ex/module3/module3.py", line 480, in readPic
    pip_install("matplotlib")
  File "E:\Slicer 5.0.2\bin\Python\slicer\util.py", line 3431, in pip_install
    _executePythonModule('pip', args)
  File "E:\Slicer 5.0.2\bin\Python\slicer\util.py", line 3394, in _executePythonModule
    logProcessOutput(proc)
  File "E:\Slicer 5.0.2\bin\Python\slicer\util.py", line 3363, in logProcessOutput
    raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)
subprocess.CalledProcessError: Command '['E:/Slicer 5.0.2/bin/../bin\\PythonSlicer.EXE', '-m', 'pip', 'install', 'matplotlib']' returned non-zero exit status 1.
...

```

as shown in the picture:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/9/493dc4a91f365eeaf6e24861fbacd398c4863df8.png)
