title: How do make an upgrade to a python package in Google-Colab 'permanent'?
body: <p>I've been working on a notebook for some data science project, but I came across this issue with importing updated packages. I'm making plots using matplotlib. Every time I open the notebook, Google Colab imports version 3.2.2.</p>
  <pre><code>import matplotlib
  matplotlib.__version__ ## returns 3.2.2
  </code></pre>
  <p>Obviously, I tried updating the package using <code>!pip install matplotlib --upgrade</code>, and this works fine. After restarting the runtime, I now have the updated version of matplotlib (3.5.1). But whenever the session terminates, I am getting errors again on the plots I use because matplotlib's version is reverted back to 2.2.2. I tried using <code>!pip3</code> as suggested in this <a href="https://stackoverflow.com/questions/52887336/unable-to-import-the-latest-version-of-a-package-google-colab">StackOverflow question</a>, but I still get the same problem. How do I permanently upgrade a package in Google Colab?</p>