Thanks for your reply.
I tried your command. conda, pip uninstall pytorch and torch.
yhbyun@tako:~$ pip uninstall pytorch
Skipping pytorch as it is not installed.
yhbyun@tako:~$ pip uninstall torch
Skipping torch as it is not installed.
(pytorchyh2) yhbyun@tako:~/pytorch$ conda uninstall pytorch
Solving environment: failed
PackagesNotFoundError: The following packages are missing from the target environment:
Also, check if still I got any pytorch library, which is not.
(pytorchyh2) yhbyun@tako:~/pytorch$ python
Python 3.5.5 |Anaconda, Inc.| (default, May 13 2018, 21:12:35)
[GCC 7.2.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.



import torch
Traceback (most recent call last):
File “”, line 1, in 
File “/home/yhbyun/pytorch/torch/init.py”, line 16, in 
from .version import version
ImportError: No module named ‘torch.version’




exit()



After that, I installed pytorch again with source setup.py, but still got same error.
Failed to run ‘bash tools/build_pytorch_libs.sh --use-cuda --use-nnpack --use-mkldnn nccl caffe2 nanopb libshm gloo THD c10d’