This error is usually thrown, when an old shared library somewhere on your system.
Did you build PyTorch from source recently?
If so, could you run this command:
pip uninstall torch; pip uninstall torch

(it should really run twice, that’s not a typo  )