These failures all point to a torch version, which is too old, as both methods are relatively new.
I just reinstalled PyTorch 1.5.0 with torchvision 0.6.0 and am able to import both libs as well as import torch.jit.annotations.Optional.
Could you check the path of torch via: print(torch.__path__) and make sure that it’s pointing to the right environment folder?