如何在Colab上安装工具?

4
如何在Google Colab上手动安装工具?
!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'

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

如何正确纠正这个错误?
2个回答

1
尝试更改为 !pip install python-utils,但是保留 HTML。
  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'**

-1

如果这可以帮助你的代码,请尝试以下内容:

!安装 pip
!pip 安装 utils
导入 utils


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接