如何从Google Colab中的驱动器导入库

时间:2020-01-16 13:55:45

标签: python google-colaboratory

我正在尝试将驱动器上的我的我的库导入Google Colab上的文件中。

我使用下面的代码会导致错误。

from google.colab import drive
drive.mount('/content/drive')
import sys
sys.path.append('/content/drive/My Drive/Colab Notebooks')
from caltech_dataset import *

hello()

错误输出是

NameError                                 
Traceback (most recent call last)
<ipython-input-2-830f01c11387> in <module>()
     21 from caltech_dataset import *
     22 
---> 23 hello()

NameError: name 'hello' is not defined

0 个答案:

没有答案