Colaboratory: How to install and use on local machine?

50.1k Views Asked by At

Google Colab is awesome to work with, but I wish I can run Colab Notebooks completely locally and offline, just like Jupyter notebooks served from the local?

How do I do this? Is there a Colab package which I can install?


EDIT: Some previous answers to the question seem to give methods to access Colab hosted by Google. But that's not what I'm looking for.

My question is how do I pip install colab so I can run it locally like jupyter after pip install jupyter. Colab package doesn't seem to exist, so if I want it, what do I do to install it from the source?

3

There are 3 best solutions below

7
Saravanabalagi Ramachandran On BEST ANSWER

From this Github link, it seems that Google Colab may not be (or remain) opensource.

From whatever I have hunted for, the repo is here:

git clone https://github.com/googlecolab/colabtools.git
cd colabtools
python setup.py install

And then check if you have it installed :)

pip list | grep colab
google-colab                       0.0.1a1

Alternatively if you want a wheel (will be put inside dist folder), you shall do

python setup.py bdist_wheel
7
員建新 On

Google Colab is a cloud computer,it only runs through Internet,you can design your Python script,and run the Python script through Colab,run Python will use Google Colab hardware,Google will allocate CPU, RAM, GPU and etc for your Python script,your local computer just submit Python code to Google Colab,and run,then Google Colab return the result to your local computer,cloud computation is stronger than local
computation if your local computer hardware is limited,see this question link will inspire you,asked by me,https://stackoverflow.com/questions/48879495/how-to-apply-googlecolab-stronger-cpu-and-more-ram/48922199#48922199

4
Po C. On

Yes, you can connect Google Colab to Jupyter running on your local machine.

Colaboratory Local runtimes

Follow the instructions in the link above. You just need to install the jupyter extension jupyter_http_over_ws.