Python block/halt on importing torch

Hi everyone, I have developed a deep-learning object-detect program based on pytorch and it works very well. Today I deploy this program on a PC, everything goes well, but the program cannot be launched. Debug and find out that, the program blocks, or halts, on importing pytorch.

Simply start a python prompt, type import torch and the prompt blocks. top command shows that CPU/memory usage is very low. Press ctrl-c cannot stop the prompt. While other library importing is fine. I have tried pycrypto and the one I wrote myself, all work but pytorch cannot.

I have deployed more than 100 times, but never meet this situation. I also tried to reinstall pytorch, from 1.6 to 1.4, torchvision from 0.7 to 0.5, still not work. No error printed, no complain shown.

Environment:

  • OS: centos 7.4
  • CUDA: 10.0
  • NVIDIA driver: 440.82
  • GPU: GTX 1660
  • python: 3.6

pytorch version: 1.6 and 1.4.

Any information are welcome, thanks in advance.

Did you deploy on this setup and system before?
If so, what could have changed between the successful deployment and the issue now, i.e. did you change something in the OS/system?
Also, could you check if you are able to run a simple PyTorch script in a docker container?