Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using custom packages on Google-Colaboratory

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.


1 Answers

A much simpler way to install custom packages on colab:

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

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!