Google Colaboratory: misleading information about its GPU (only 5% RAM available to some users)

So to prevent another dozen of answers suggesting invalid in the context of this thread suggestion to !kill -9 -1, let’s close this thread: The answer is simple: As of this writing Google simply gives only 5% of GPU to some of us, whereas 100% to the others. Period. dec-2019 update: The problem still exists … Read more

Interactive matplotlib figures in Google Colab

Below is an example of creating interactive iplot() in Plotly and cufflinks() on Google Colab Notebook. Used functions and suggestions from the answer [1, 2] The key seems to be to include configure_plotly_browser_state() in the cell that does the plotting. Code below should work: Import libraries import datetime from datetime import date import pandas as … Read more

conda environment in google colab [google-colaboratory]

You can activate and run a new conda environment in Google Colab by using the magic %%bash command: %%bash source activate myenv python import sys # some simple python commands sys.path.append(‘/usr/local/lib/python3.6/site-packages’) print(sys.path) print(“Python version”) print(sys.version) Also including a few other commands I needed to run to get my environment setup completely: !conda update conda -y … Read more

ImportError: Cannot load backend ‘TkAgg’ which requires the ‘tk’ interactive framework, as ‘headless’ is currently running

What solved the problem for me was to restart my kernel, import the following first: import matplotlib matplotlib.use(‘TKAgg’) Then, import matplotlib.pyplot as plt You probably imported matplotlib with another framework before you tried to change to TKAgg. Restart your kernel.