I installed torchaudio according to the instruction by https://github.com/pytorch/audio 37. Nevertheless, when I tried to import torchaudio, the following error message popped up:
Traceback (most recent call last):
File “test.py”, line 1, in 
import torchaudio
File “/Users/q7/Desktop/Wavenet/audio-master/torchaudio/init.py”, line 7, in 
from torchaudio import transforms, datasets, kaldi_io, sox_effects, legacy, compliance
File “/Users/q7/Desktop/Wavenet/audio-master/torchaudio/transforms.py”, line 6, in 
from . import functional as F
File “/Users/q7/Desktop/Wavenet/audio-master/torchaudio/functional.py”, line 108, in 
@torch.jit.script
File “/anaconda3/lib/python3.7/site-packages/torch/jit/init.py”, line 824, in script
fn = torch._C._jit_script_compile(ast, _rcb, get_default_args(obj))
File “/anaconda3/lib/python3.7/site-packages/torch/jit/annotations.py”, line 55, in get_signature
return parse_type_line(type_line)
File “/anaconda3/lib/python3.7/site-packages/torch/jit/annotations.py”, line 97, in parse_type_line
raise RuntimeError(“Failed to parse the argument list of a type annotation: {}”.format(str(e)))
RuntimeError: Failed to parse the argument list of a type annotation: name ‘Optional’ is not defined
Can someone propose a solution? Thanks a lot.