如何在colab上安装utils?

问题描述 投票:1回答:1

如何在google colab上手动安装util?

!pip install web.py==0.40.dev0
import utils

错误

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-13-a4c82eaa1619> in <module>()
     20 import torch.backends.cudnn
     21 get_ipython().system('pip install web.py==0.40.dev0')
---> 22 from Utils import *
     23 from PIL import Image
     24 from torch import nn

ModuleNotFoundError: No module named 'Utils'

---------------------------------------------------------------------------

如何正确纠正这个错误?

python-import google-colaboratory
1个回答
0
投票

尝试改为!pip install python-utils但是

  Installing collected packages: python-utils
**Successfully installed python-utils-2.3.0**
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-2-e6796b5aa862> in <module>()
     20 import torch.backends.cudnn
     21 get_ipython().system('pip install python-utils')
---> 22 import utils
     23 from PIL import Image
     24 from torch import nn

ModuleNotFoundError: **No module named 'utils'**
© www.soinside.com 2019 - 2024. All rights reserved.