Using custom packages on Google-Colaboratory

Question:

I’m trying to install a custom python package on Google Colaboratory, that is not available on pip. And I’m facing some weird errors while doing that.

For example, here is a boiler-plate python package: https://github.com/mtchavez/python-package-boilerplate.

Then I tried to install it from the source.

%%bash
git clone https://github.com/mtchavez/python-package-boilerplate
cd rohan
pip install -e .

This time, however, I had experienced errors while importing submodules

ImportError: cannot import name ..

This package installs perfectly on my local computer/s. So I’m not sure why I’m not able to use it on Colaboratory.

Asked By: user3521099

||

Answers:

A much simpler way to install custom packages on colab:

pip install git+https://github.com/mtchavez/python-package-boilerplate
Answered By: user3521099

pip install git+https://github.com/mtchavez/python-package-boilerplate
pip install git

Answered By: Gorla ArunKumar