Download a single folder or directory from a GitHub repo to Colab

Question:

This topic suggests:

svn checkout https://github.com/lodash/lodash/trunk/test

But it doesn’t work in Colab. I tried to install svn:

!pip install tsvn

It returns an error:

ERROR: Command errored out with exit status 1: python setup.py
egg_info Check the logs for full command output.

Is there another way to download a folder from github?

Asked By: dereks

||

Answers:

Don’t use pip, use apt instead

!apt install subversion

Then you can checkout normally

!svn checkout https://github.com/lodash/lodash/trunk/test
Answered By: korakot

Colab uses Linux machine in the backend so use apt instead of pip

subversion colab screenshot

Answered By: Gulab Patel