如何在googlecolab上只加载一个特定的文件夹?

2024-05-15 12:35:34 发布

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

我试图从驱动器加载文件夹,但加载时出错

ValueError                                Traceback (most recent call last)
<ipython-input-3-a977da366961> in <module>()
      1 from google.colab import drive
----> 2 drive.mount('content/gdrive/My Drive/kaggle')

/usr/local/lib/python3.6/dist-packages/google/colab/drive.py in mount(mountpoint, force_remount, timeout_ms)
     69 
     70   if ' ' in mountpoint:
---> 71     raise ValueError('Mountpoint must not contain a space.')
     72 
     73   mountpoint = _os.path.expanduser(mountpoint)

ValueError: Mountpoint must not contain a space.

我怎样才能消除这个错误呢。以下是我尝试过的:

^{pr2}$

Tags: in文件夹googlenotspacedrive驱动器colab