Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torchaudio does not work #2417

Closed
mthrok opened this issue Nov 12, 2021 · 13 comments
Closed

torchaudio does not work #2417

mthrok opened this issue Nov 12, 2021 · 13 comments

Comments

@mthrok
Copy link

mthrok commented Nov 12, 2021

Describe the current behavior
The following code was working earlier with PyTorch 1.9,

!pip install torchaudio
import torchaudio

but after #2372, it no longer works with the following error;

Collecting torchaudio
  Downloading torchaudio-0.10.0-cp37-cp37m-manylinux1_x86_64.whl (2.9 MB)
     |████████████████████████████████| 2.9 MB 9.3 MB/s 
Requirement already satisfied: torch==1.10.0 in /usr/local/lib/python3.7/dist-packages (from torchaudio) (1.10.0+cu111)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from torch==1.10.0->torchaudio) (3.10.0.2)
Installing collected packages: torchaudio
Successfully installed torchaudio-0.10.0
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-90af107c3418> in <module>()
      4 get_ipython().system('pip install torchaudio')
      5 
----> 6 import torchaudio
      7 print(torchaudio.__version__)

4 frames
/usr/lib/python3.7/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
    362 
    363         if handle is None:
--> 364             self._handle = _dlopen(self._name, mode)
    365         else:
    366             self._handle = handle

OSError: libcudart.so.10.2: cannot open shared object file: No such file or directory

Describe the expected behavior

a version of torchaudio 0.10 that matches with the pre-installed PyTorch should be installed and works.

What web browser you are using

I tried with Chrome and Safari

  • Safari (Version 15.1 (17612.3.2.1.1))
  • Chrome (Version 95.0.4638.69 (Official Build) (arm64))
@malfet
Copy link

malfet commented Nov 12, 2021

This is sort of expected, as you are trying to mix-n-match torch+cu113 and torchaudio+cu102
Testing if pip install torchaudio -f https://download.pytorch.org/whl/cu113/torch_stable.html will work

And indeed it does:
image

@mthrok
Copy link
Author

mthrok commented Nov 12, 2021

Yeah, but the concern is that all the Colab notebooks with torchaudio from the past has stopped working.

@mravanelli
Copy link

I have the same issue and this is breaking all the tutorials of SpeechBrain (https://speechbrain.github.io/). It is also breaking the torchaudio tutorials and many others I think. It would be great to fix it such that people can simply do "pip install torchaudio" as before.

@colaboratory-team
Copy link
Contributor

Being worked on with internal bug: b/206623828

@aheba
Copy link

aheba commented Nov 17, 2021

Hello @colaboratory-team,
we do a tutorial (20 students) this morning with torchaudio on collab and we got stuck too...

One of the solution is to use:

!pip install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html 

are you working on that problem ?

@zpapakipos
Copy link

Hi, this issue has also broken 50% of our example colabs for the AugLy library (https://github.com/facebookresearch/AugLy/tree/main/examples). Do you have an ETA on when this issue will be fixed, or should we implement workarounds?

@mravanelli
Copy link

mravanelli commented Nov 18, 2021 via email

@pierrebedu
Copy link

aheba gave a (temporary) solution 23 hours ago

@mravanelli
Copy link

mravanelli commented Nov 18, 2021 via email

@colaboratory-team
Copy link
Contributor

Fixed.

@mravanelli
Copy link

mravanelli commented Nov 19, 2021 via email

facebook-github-bot pushed a commit to facebookresearch/AugLy that referenced this issue Nov 19, 2021
Summary:
## Related Issue
Fixes #145

- [x] I have read CONTRIBUTING.md to understand how to contribute to this repository :)

Adding `pip install` lines to the audio & video colab notebooks so there's no error when running them. A hopefully temporary workaround to the [known issue](googlecolab/colabtools#2417) with torchaudio & colab.

## Unit Tests
If your changes touch the `audio` module, please run all of the `audio` tests and paste the output here. Likewise for `image`, `text`, & `video`. If your changes could affect behavior in multiple modules, please run the tests for all potentially affected modules. If you are unsure of which modules might be affected by your changes, please just run all the unit tests.

### Audio
N/A

## Other testing

**Audio notebook**
Before:
![Screenshot 2021-11-18 at 14 53 09](https://user-images.githubusercontent.com/10163956/142430862-994f1d64-6ef5-4898-ab60-d43f0f002add.png)

After:
![Screenshot 2021-11-18 at 14 55 16](https://user-images.githubusercontent.com/10163956/142430885-af824eae-5172-46fa-ac49-afc9eee0b4f8.png)

**Video notebook**
Before:
![Screenshot 2021-11-18 at 15 03 21](https://user-images.githubusercontent.com/10163956/142430914-73f8442b-8a1d-4e4d-8cec-737a1789a4b4.png)

After:
![Screenshot 2021-11-18 at 15 05 05](https://user-images.githubusercontent.com/10163956/142430934-e731f9ca-84d5-40b0-aad8-6a02267dc2e8.png)

Pull Request resolved: #146

Reviewed By: jbitton

Differential Revision: D32530458

Pulled By: zpapakipos

fbshipit-source-id: 7b8e5ab382f4fe42a9bde00c39dd91354f541602
@mthrok
Copy link
Author

mthrok commented Nov 19, 2021

Thank you @colaboratory-team !

@loretoparisi
Copy link

loretoparisi commented Nov 20, 2021

This is amazing!
In my case I had to do the following:

%pip install torch==1.10.0+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html

Then it worked

import torchaudio
print(torchaudio.__version__)
0.10.0+cu113
time: 699 ms (started: 2021-11-15 12:51:46 +00:00)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants