Import matplotlib, Python exits

Dear,

When I import matplotlib, Python exits.

Using in Command Prompt


(virtual environment) C:\Users\my-computer>py
Python 3.11.0 (main, Oct 24 2022, 18:13:38) [MSC v.1933 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

import matplotlib

(virtual environment) C:\Users\my-computer>


I’m a user of Windows 10 Pro 32 bits, Python 3.11 32 bits and IDLE Python (which comes standard in the Python installation).

My Python works perfectly, in the common environment, in IDLE, in the CMD (command prompt) and in the virtual environment (virtualenv).

Through pip I install my libraries, and when I install matplotlib, it gives me the matplotlib-3.7.1 version and along with it installs some other libraries.

pip freeze - It gives me this:

pip freeze
contourpy==1.0.7
cycler==0.11.0
fonttools==4.39.3
kiwisolver==1.4.4
matplotlib==3.7.1
numpy==1.24.2
packaging==23.0
Pillow==9.5.0
pyparsing==3.0.9
python-dateutil==2.8.2
six==1.16.0

pip list - It gives me this:

Package Version


contourpy 1.0.7
cycler 0.11.0
fonttools 4.39.3
kiwisolver 1.4.4
matplotlib 3.7.1
numpy 1.24.2
packaging 23.0
Pillow 9.5.0
pip 23.0.1
pyparsing 3.0.9
python-dateutil 2.8.2
setuptools 65.5.0
six 1.16.0

Below, I try to import by IDLE and the RESTART: Shell.

Then I run several codes and imports, but when I import matplotlib, RESTART: Shell.

erro 1