PyTorch tries to import dataclass from the dataclasses Python library in this line of code 1.
However, based on the stack trace, it seems that you are also using a Python script called dataclasses.py in your working environment:
File "/home/alexisshakas/git/deeplogger/dataclasses.py", line 2, in <module>
    import matplotlib.pyplot as plt

which is then called and tries to import matplotlib, which eventually fails.
Could you rename your file for the sake of debugging and maybe change its name so that it doesn’t create conflicts with Python’s built-in classes?