Could you post a minimal and executable code snippet to reproduce the error as well as the output of python -m torch.utils.collect_env, please?
python -m torch.utils.collect_env
You can post code snippets by wrapping them into three backticks ```, which makes debugging easier.