【问题标题】:Downloading an entire git repo to google colab将整个 git 存储库下载到 google colab
【发布时间】:2019-09-10 11:48:58
【问题描述】:

github 上有一个存储库,其中包含图像数据集。我想在我的 google colab 上下载整个存储库。但它似乎不起作用。 这是我尝试过的

from google.colab import drive
drive.mount('/content/drive')

# kaggle is the folder that I created on my drive
!cd "drive/My Drive/kaggle"

# Downloading the repo on my drive
!git clone https://github.com/ardamavi/Sign-Language-Digits-Dataset.git

但我遇到了一个错误

Cloning into 'Sign-Language-Digits-Dataset'...
fatal: I don't handle protocol '/content/https'

预期结果:

如何将整个 repo 下载到我的驱动器或 google colab 的运行时存储中。他们中的任何一个都可以。

注意:我尝试了所有可能的答案,作为对这个问题的建议,但没有一个对我有用。

【问题讨论】:

    标签: python git github google-colaboratory kaggle


    【解决方案1】:

    尝试使用%cd 而不是!cd。使用! 执行的命令在子shell 中执行,因此如果您使用! 执行cd,您实际上不会更改后续shell 命令的工作目录。

    这是一个例子:

    【讨论】:

    • 你能解释一下错误I don't handle protocol '/content/https'
    猜你喜欢
    • 2020-04-21
    • 1970-01-01
    • 2012-06-10
    • 2021-01-27
    • 2016-12-27
    • 1970-01-01
    • 2022-08-05
    • 2020-10-21
    • 1970-01-01
    相关资源
    最近更新 更多