googlecolab / jupyter_http_over_ws

Apache License 2.0
267 stars 56 forks source link

Tricky installation on Compute Engine VMs leads to unstable Colab notebooks #13

Closed baristahell closed 4 years ago

baristahell commented 4 years ago

Hello Colab team!

I'm having a few issues since the Colab update when I'm trying to connect a Compute Engine VM as backend.

pip install --upgrade jupyter_http_over_ws>=0.0.7can only be ran as sudo. This makes is so that jupyter serverextension enable --py jupyter_http_over_ws and the Jupyter kernel init (using --allow-root) have to be ran as sudo too because if you don't, they're using the regular user's config (so version 0.0.6, which doesn't work with Colab...) and 0.0.7 is only installed for root. Colab is then able to connect to the VM, but this seems to lead to some weird issues where f-string are considered syntax errors despite my Python version being 3.5.3, pubsub_v1 not found after pip install --upgrade google-cloud-pubsub, etc... for example.

The worst is, I tried with another, simpler and cpu-only VM I just created and it works perfectly. I don't understand this seemingly random behavior

Am I missing something obvious or is it a known issue with Compte Engine VMs?

Thank you!

tl;dr: some Compute Engine VMs + jupyter_http_over_ws + Colab = weird errors

I rerun everything without panicking and it worked just fine... I think it was just caused by trying to jump steps and some installs I did in the notebook that broke some dependencies. Point taken.