question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import torchaudio causes error with latest version of PyTorch

See original GitHub issue

🐛 Bug

import torchaudio with latest version of PyTorch built from source causes error:

>>> import torchaudio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/sethweidman/anaconda3/lib/python3.7/site-packages/torchaudio/__init__.py", line 5, in <module>
    import _torch_sox
ImportError: dlopen(/Users/sethweidman/anaconda3/lib/python3.7/site-packages/_torch_sox.cpython-37m-darwin.so, 2): Symbol not found: __ZN3c1011CPUTensorIdEv
  Referenced from: /Users/sethweidman/anaconda3/lib/python3.7/site-packages/_torch_sox.cpython-37m-darwin.so
  Expected in: flat namespace
 in /Users/sethweidman/anaconda3/lib/python3.7/site-packages/_torch_sox.cpython-37m-darwin.so

Expected behavior

Nothing.

Environment

Collecting environment information...
PyTorch version: 1.4.0a0+013ca32
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 10.14.6
GCC version: Could not collect
CMake version: version 3.14.0

Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] msgpack-numpy==0.4.4.3
[pip] numpy==1.17.2
[pip] numpydoc==0.9.1
[pip] pytorch-sphinx-theme==0.0.24
[pip] torch==1.4.0a0+013ca32
[pip] torchaudio==0.3.0
[pip] torchtext==0.4.0
[pip] torchvision==0.5.0a0+e8b830f
[conda] _tflow_select             2.3.0                       mkl  
[conda] blas                      1.0                         mkl  
[conda] mkl                       2019.4                      233  
[conda] mkl-include               2019.4                      233  
[conda] mkl-service               2.3.0            py37hfbe908c_0  
[conda] mkl_fft                   1.0.14           py37h5e564d8_0  
[conda] mkl_random                1.1.0            py37ha771720_0  
[conda] pytorch-sphinx-theme      0.0.24                    dev_0    <develop>
[conda] tensorflow                1.13.1          mkl_py37h70c3834_0  
[conda] tensorflow-base           1.13.1          mkl_py37h66b1bf0_0  
[conda] torch                     1.4.0a0+013ca32          pypi_0    pypi
[conda] torchaudio                0.3.0                    pypi_0    pypi
[conda] torchtext                 0.4.0                    pypi_0    pypi
[conda] torchvision               0.4.0                    pypi_0    pypi

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
vincentqbcommented, Oct 24, 2019

As mentioned here, uploading the new version fixed the issue on my side. Please feel free to re-open if it is not fixed on yours.

conda create -n pytorch-conda python=3.7
conda activate pytorch-conda
conda install -c conda-forge sox
conda install -c pytorch torchaudio
python -c "import torchaudio"
0reactions
vincentqbcommented, Oct 23, 2019

As mentioned in #308, the new binaries need to be uploaded to pypi and conda. The former is done, but not the latter.

Read more comments on GitHub >

github_iconTop 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. If possible, following the instructions on...
Read more >
Use torchaudio cause torch jit load model error,help! - audio
we use pytorch version of 1.7.0+cu101 to turn torchscript,and I successfully loaded the torchscript model in torch version of 1.7.0+cu101 ...
Read more >
Import error while using torch.hub.load - vision - PyTorch Forums
Could you update to the latest release, as it seems to be a known issue which was already fixed as described here?
Read more >
Error occurred when I tried to import torchaudio - audio
There was bad commit in torchaudio. Solution: old version with pytorch 1.0. pip3 install git+https://github.com/pytorch/audio@d92de5b.
Read more >
unable to load torchaudio even after installing - Stack Overflow
This was worked for me (after uninstalling existing torchaudio): import os !git clone https://github.com/pytorch/audio.git os.chdir("audio") ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found