A better, more modern, answer to this question is to use the %pip
magic, like:
%pip install scipy
That will automatically use the correct Python version. Using !pip
might be tied to a different version of Python, and then you might not find the package after installing it.
And in colab, the magic gives a nice message and button if it detects that you need to restart the runtime if pip updated a packaging you have already imported.
BTW, there is also a %conda
magic for doing the same with conda.