Cannot install Google Colab locally
From Colab's issues repo, Craig Citro (a software engineer on Google Colab) stated the following
There's no way to run the colab frontend locally.
To note, however, that Colaboratory lets you connect to a local runtime using Jupyter. This allows you to execute code on your local hardware and have access to your local file system (it's a Colab frontend with a local runtime). If that is your goal, here you can find a way to do that.
Setup instructions
In order to allow Colaboratory to connect to your locally running Jupyter server, you'll need to perform the following steps.
Step 1:Install JupyterInstall Jupyter on your local machine.
Step 2: Install and enable the
jupyter_http_over_ws
jupyter extension (one-time)Thejupyter_http_over_ws
extension is authored by the Colaboratory team and available on GitHub.pip install jupyter_http_over_wsjupyter serverextension enable --py jupyter_http_over_ws
Step 3: Start server and authenticate
New notebook servers are started normally, though you will need to set a flag to explicitly trust WebSocket connections from the Colaboratory frontend.
jupyter notebook \ --NotebookApp.allow_origin='https://colab.research.google.com' \ --port=8888 \ --NotebookApp.port_retries=0
Once the server has started, it will print a message with the initialbackend URL used for authentication. Make a copy of this URL as you'llneed to provide this in the next step. Step 4: Connect to the localruntime
In Colaboratory, click the "Connect" button and select "Connect tolocal runtime...". Enter the URL from the previous step in the dialogthat appears and click the "Connect" button. After this, you shouldnow be connected to your local runtime.