For your information, I use default python3 from ubuntu and I try to avoid install anaconda because it will crash my other program (library installation and environment, need more time to adjust the library in anaconda python)
So based on your answer, the error is caused by last installation pytorch ?