如何在谷歌合作实验室安装UTIL?

2024-10-04 05:34:13 发布

您现在位置:Python中文网/ 问答频道 /正文

嗨,我在谷歌合作实验室工作。虽然我已经安装了这个库utils,但每次都会出现错误 :

import numpy as np
import torch
from utils import utils # <-----

class SpeechDataGenerator():
ModuleNotFoundError: No module named 'utils'

怎么办


Tags: nofromimportnumpyas错误nputils
1条回答
网友
1楼 · 发布于 2024-10-04 05:34:13

如果您谈论的是Python Utils包,那么您应该通过以下方式导入它:

from python_utils import utils

确保通过执行此单元格安装了模块:

!pip install python_utils

此外,建议在模块安装后重新启动运行时

相关问题 更多 >