CUDA 11.6 deprecation help

Hi all,

I’ve recently been getting the error: RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf

in my google colab instance, I then updated pytorch and torchaudio to latest then kept getting error:

ImportError: cannot import name ‘fail_with_message’ from ‘torchaudio._internal.module_utils’ (/usr/local/lib/python3.9/dist-packages/torchaudio/_internal/module_utils.py)

There was also an error somewhere claiming: pytorch CUDA version 11.6 is the current version but CUDA was on 11.7 (I’m presuming this is the version that the Google instance GPU is on)? Either way from this message I decided to update pytorch and torchaudio to latest but then kept getting:

ImportError: cannot import name ‘fail_with_message’ from ‘torchaudio._internal.module_utils’ (/usr/local/lib/python3.9/dist-packages/torchaudio/_internal/module_utils.py)

when previously just yesterday my code was working fine.

This is what I’ve been using to install pytorch in my instance which was working last night:
pip install --extra-index-url https://download.pytorch.org/whl/cu116

Any ideas?

Thanks in advance

Your install command would install an older PyTorch and torchaudio release as the current 2.0.0 release ships with CUDA 11.7 or 11.8.
I also cannot reproduce the torchaudio error using the latest 2.0.1 version:

from torchaudio._internal.module_utils import fail_with_message
fail_with_message
<function torchaudio._internal.module_utils.fail_with_message(message)>

torchaudio.__version__
'2.0.1+cu118'