python - Jupyter 无法识别 torchaudio

标签 python pip jupyter-notebook pytorch

我正在尝试安装 torchaudio 以在 Jupyter 笔记本中使用,但是当我导入它时,出现错误:

ModuleNotFoundError: No module named 'torchaudio'

我尝试将其导入笔记本使用的 .py 文件中,但没有成功。我想也许它没有正确安装,但是当我尝试使用 pip install torchaudio 安装它时,我得到“要求已经满足”。

我迷路了,如何才能成功导入?

最佳答案

pip install torchaudio

应该返回:

Collecting torchaudio
  Downloading https://files.pythonhosted.org/packages/96/34/c651430dea231e382ddf2eb5773239bf4885d9528f640a4ef39b12894cb8/torchaudio-0.6.0-cp36-cp36m-manylinux1_x86_64.whl (6.7MB)

     |████████████████████████████████| 6.7MB 2.4MB/s 
Requirement already satisfied: torch==1.6.0 in /usr/local/lib/python3.6/dist-packages (from torchaudio) (1.6.0+cu101)
Requirement already satisfied: future in /usr/local/lib/python3.6/dist-packages (from torch==1.6.0->torchaudio) (0.16.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from torch==1.6.0->torchaudio) (1.18.5)
Installing collected packages: torchaudio
Successfully installed torchaudio-0.6.0

一切都应该按预期进行。

关于python - Jupyter 无法识别 torchaudio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64058958/

相关文章:

python - Linux终端术语和命令行混淆: pip install versus sudo apt-get and other terminal questions

python - 通过 pip 安装本地轮时 ValueError "Expected version spec"

anaconda - 如何卸载从 Anaconda 安装的 Jupyter Notebook?

r - Azure Notebooks 中插入符号包安装失败且退出状态为非零

python - Prophet fit 导致 Jupyter Notebook 崩溃

python - 如何在imshow中绘制单元格边框

python - Pylons 响应未返回 Content-Length header

python - 在不使用 pip 的情况下安装 python wheel 文件

python - 在azure上提交用python编写的批处理作业

python - 子进程无法捕获 STDOUT - 程序可能在做什么?