import torchaudio error
See original GitHub issueThanks for introducing torchaudio. However, I’m getting an error on Linux, Python 3.5, CUDA 10. Works OK on Linux, Python 3.5, and CUDA 9.2
Here is the error
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> import torchaudio
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/abisw/pytorch-py35/lib/python3.5/site-packages/torchaudio/__init__.py", line 8, in <module>
from torchaudio import transforms, datasets, kaldi_io, sox_effects, compliance, _docs
File "/home/abisw/pytorch-py35/lib/python3.5/site-packages/torchaudio/transforms.py", line 6, in <module>
from . import functional as F
File "/home/abisw/pytorch-py35/lib/python3.5/site-packages/torchaudio/functional.py", line 175, in <module>
@torch.jit.script
File "/home/abisw/pytorch-py35/lib/python3.5/site-packages/torch/jit/__init__.py", line 1181, in script
return _compile_function(fn=obj, qualified_name=qualified_name, _frames_up=_frames_up + 1, _rcb=_rcb)
File "/home/abisw/pytorch-py35/lib/python3.5/site-packages/torch/jit/__init__.py", line 1077, in _compile_function
script_fn = torch._C._jit_script_compile(qualified_name, ast, _rcb, get_default_args(fn))
File "/home/abisw/pytorch-py35/lib/python3.5/site-packages/torch/jit/annotations.py", line 58, in get_signature
return parse_type_line(type_line)
File "/home/abisw/pytorch-py35/lib/python3.5/site-packages/torch/jit/annotations.py", line 110, in parse_type_line
arg_types = [ann_to_type(ann) for ann in arg_ann]
File "/home/abisw/pytorch-py35/lib/python3.5/site-packages/torch/jit/annotations.py", line 110, in <listcomp>
arg_types = [ann_to_type(ann) for ann in arg_ann]
File "/home/abisw/pytorch-py35/lib/python3.5/site-packages/torch/jit/annotations.py", line 227, in ann_to_type
raise ValueError("Unknown type annotation: '{}'".format(ann))
ValueError: Unknown type annotation: 'typing.Union[int, NoneType]'
>>>
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Torchaudio import error - audio - PyTorch Forums
The error message indicates a mismatch between the PyTorch version expected by torchaudio and the one installed. Generally, compiling the auxiliary libraries ( ......
Read more >unable to load torchaudio even after installing - Stack Overflow
I'm trying to use torchaudio but I'm unable to import it. I have installed it and it is also visible through the pip...
Read more >Problems with torchaudio install in ubuntu 20 and python38
import torchaudio Traceback (most recent call last): File "<stdin>", line 1, ... torchaudio and import it, it gives me the following error:…
Read more >torchaudio - PyPI
torchaudio 0.13.1. pip install torchaudio. Copy PIP instructions. Latest version. Released: Dec 15, 2022. An audio package for PyTorch ...
Read more >Error while importing torchaudio in a kaggle notebook - Reddit
I'm getting this error: `AttributeError: module 'torchaudio._internal.module_utils' has no attribute 'requires_sox'` while importing ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @jamarshon I tried it. Very interesting that everything works in the conda environment as you suggested.
I installed latest anaconda.
Then did: $ conda create --name env3.5 python=3.5 $ conda activate env3.5
Then pip3 install torch torchvision pip3 install torchaudio
And everything works with CUDA10, Python 3.5! So, closing the issue … but maybe there is still something fishy for you to investigate, i.e. why it’s not working in a non-conda environment.
Same issue. Can we keep this open? Seems to not work in a non conda environment