I'm facing below error while importing matplotlib(version 3.3.2) on ubuntu server.
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/matplotlib/__init__.py", line 904, in <module>
rcParamsDefault = _rc_params_in_file(
File "/usr/local/lib/python3.8/site-packages/matplotlib/__init__.py", line 803, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/usr/local/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.8/site-packages/matplotlib/__init__.py", line 777, in _open_file_or_url
fname = os.path.expanduser(fname)
File "/usr/local/lib/python3.8/posixpath.py", line 231, in expanduser
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not PosixPath
I have tried upgrading to 3.4.1 but still in pip list it is showing as 3.3.2 version.