Thanks for you reply!
I installed pytorch with the comand recommend  like this
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch

Actually I did intend to import torch,  but it failed, and we found it was the following code
from torch._C import *

in torch’s init()  caused this issue. And when I attemped to run a python file test.py which only contains the above code in Xshell using the comand :  python3 test.py, it would work with a quite short time.
I hope these imformation can help you!
Thaks again.