I installed matplotlib using anaconda and when i try to import matplotlib i get check version error in jupyter notebook and pycharm .

installed matplotlib using anaconda and when i tried to import “import matplotlib.pyplot as plt” , i recive the following error.

ImportError Traceback (most recent call last)
----> 1 import matplotlib.pyplot as plt
2 import numpy as np
4 x = [1, 2, 2.5, 3, 4]
5 y = [1, 4, 7, 9, 15]

C:\Anaconda\envs\tensorflow\lib\site-packages\matplotlib_ *init* _.py in
--> 205 _check_versions()

C:\Anaconda\envs\tensorflow\lib\site-packages\matplotlib_ *init* _.py in _check_versions()
188 # Quickfix to ensure Microsoft Visual C++ redistributable
189 # DLLs are loaded before importing kiwisolver
--> 190 from . import ft2font
192 for modname, minver in [

ImportError: DLL load failed: %1 is not a valid Win32 application.

I tried reinstalling using pip but everytime i recive this error, both in jupyter notebook and pycharm ide.
Please help me regarding this. I would be highly obliged to you.

What version of: Python and Matplotlib have you installed? From the name of your environment I assume you also have tensorflow installed?

How did you install all of these packages? If you are using conda, I suggest sticking with conda (and not using pip at all). If you have been using both conda and pip to install overlapping packages it is possible you have driven your environment to a broken an non-recoverable state. The quickest course of action is to create a new conda environment and install everything via conda.