when I try to pip install matplotlib I get the following error. Moreover, when I try to import matplotlib, it works but when I try and import matplotlib.pyplot, I get an error similar to the one shown below
user@localhost ~]$ pip install matplotlib
loading python from the terminal results in the following message.
On the otherhand, the following errors appear when importing matplotlib.pyplot
user@localhost ~]$ pip install matplotlib
Error:Error processing line 7 of /usr/local/lib/python3.8/site-packages/pywin32.pth:
Traceback (most recent call last):
File "/usr/lib64/python3.8/site.py", line 169, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pywin32_bootstrap'
Remainder of file ignored
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: matplotlib in ./.local/lib/python3.8/site-packages (3.2.1)
Requirement already satisfied: numpy>=1.11 in ./.local/lib/python3.8/site-packages (from matplotlib) (1.18.4)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.8/site-packages (from matplotlib) (2.8.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./.local/lib/python3.8/site-packages (from matplotlib) (2.4.7)
Requirement already satisfied: cycler>=0.10 in ./.local/lib/python3.8/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.8/site-packages (from matplotlib) (1.2.0)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.8/site-packages (from python-dateutil>=2.1->matplotlib) (1.14.0)
If someone can help me get rid of this problem It would be awesomeloading python from the terminal results in the following message.
Error:Error processing line 7 of /usr/local/lib/python3.8/site-packages/pywin32.pth:
Traceback (most recent call last):
File "/usr/lib64/python3.8/site.py", line 169, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pywin32_bootstrap'
Remainder of file ignored
Python 3.8.3 (default, May 15 2020, 00:00:00)
[GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
It does load and one can do a lot of thing but this error given above is what you see at the beginningOn the otherhand, the following errors appear when importing matplotlib.pyplot
Error:>>> import matplotlib.pyplot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/roguestate/.local/lib/python3.8/site-packages/matplotlib/pyplot.py", line 2282, in <module>
switch_backend(rcParams["backend"])
File "/home/roguestate/.local/lib/python3.8/site-packages/matplotlib/__init__.py", line 832, in __getitem__
plt.switch_backend(rcsetup._auto_backend_sentinel)
File "/home/roguestate/.local/lib/python3.8/site-packages/matplotlib/pyplot.py", line 213, in switch_backend
switch_backend("agg")
File "/home/roguestate/.local/lib/python3.8/site-packages/matplotlib/pyplot.py", line 221, in switch_backend
backend_mod = importlib.import_module(backend_name)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/roguestate/.local/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 50, in <module>
from PIL import Image
File "/usr/local/lib/python3.8/site-packages/PIL/Image.py", line 69, in <module>
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (/usr/local/lib/python3.8/site-packages/PIL/__init__.py)
>>>