gpt4 book ai didi

python-import - 如何在colab上安装utils?

转载 作者:行者123 更新时间:2023-12-03 21:24:46 26 4
gpt4 key购买 nike

如何在 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'

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

如何正确纠正这个错误?

最佳答案

尝试更改为 !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'**

关于python-import - 如何在colab上安装utils?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49094962/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com