Repository: d2l-ai/d2l-en

Issue:
ModuleNotFoundError when running the official pytorch colab notebook
![image](https://user-images.githubusercontent.com/33608782/184685789-951935c7-1725-4a23-944d-8d48b32bf76c.png)

I can replicate the error at multiple official pytorch colab notebooks, e.g. 

https://colab.research.google.com/github/d2l-ai/d2l-pytorch-colab/blob/master/chapter_linear-classification/image-classification-dataset.ipynb#scrollTo=ee445cce



ModuleNotFoundError when running the official pytorch colab notebook
![image](https://user-images.githubusercontent.com/33608782/184685789-951935c7-1725-4a23-944d-8d48b32bf76c.png)

I can replicate the error at multiple official pytorch colab notebooks, e.g. 

https://colab.research.google.com/github/d2l-ai/d2l-pytorch-colab/blob/master/chapter_linear-classification/image-classification-dataset.ipynb#scrollTo=ee445cce





Discussion:
As a result, all of the following code cells cannot run because the the name 'd2l' is not defined. 

For example,

![image](https://user-images.githubusercontent.com/33608782/184687484-f918a909-6bf4-4640-920f-84aea2c5cb1e.png)

Thanks for the report @gab-chen. This is quite weird. I was able to reproduce the problem on all the frameworks. 

Just two days ago, I was testing the same notebook on colab to fix #2247. It seems like colab has dropped `matplotlib_inline` package support or I'm missing something here. This will then need a manual install or adding it as a dep in d2l.

cc @astonzhang 
> Thanks for the report @gab-chen. This is quite weird. I was able to reproduce the problem on all the frameworks.
> 
> Just two days ago, I was testing the same notebook on colab to fix #2247. It seems like colab has dropped `matplotlib_inline` package support or I'm missing something here. This will then need a manual install or adding it as a dep in d2l.
> 
> cc @astonzhang

Thanks for your prompt response. 
I confirm that yesterday I could import `d2l` and run the official pytorch notebooks without any error. 
For anyone who is blocked by the error, 
you can manually install like below to avoid the error. 
`!pip install matplotlib-inline`
![image](https://user-images.githubusercontent.com/33608782/184924270-b1cfd6b1-c48e-4120-bb91-7a077d990388.png)


But it is time-consuming and error-prone to update all of the D2L pytorch notebooks on reader side. 
@AnirudhDagar Please consider adding it as a dep in d2l ASAP.
@gab-chen we'll try to fix this in our next release, maybe we can create a patch release this week to fix this problem. @astonzhang WDYT?
As a result, all of the following code cells cannot run because the the name 'd2l' is not defined. 

For example,

![image](https://user-images.githubusercontent.com/33608782/184687484-f918a909-6bf4-4640-920f-84aea2c5cb1e.png)

Thanks for the report @gab-chen. This is quite weird. I was able to reproduce the problem on all the frameworks. 

Just two days ago, I was testing the same notebook on colab to fix #2247. It seems like colab has dropped `matplotlib_inline` package support or I'm missing something here. This will then need a manual install or adding it as a dep in d2l.

cc @astonzhang 
> Thanks for the report @gab-chen. This is quite weird. I was able to reproduce the problem on all the frameworks.
> 
> Just two days ago, I was testing the same notebook on colab to fix #2247. It seems like colab has dropped `matplotlib_inline` package support or I'm missing something here. This will then need a manual install or adding it as a dep in d2l.
> 
> cc @astonzhang

Thanks for your prompt response. 
I confirm that yesterday I could import `d2l` and run the official pytorch notebooks without any error. 
For anyone who is blocked by the error, 
you can manually install like below to avoid the error. 
`!pip install matplotlib-inline`
![image](https://user-images.githubusercontent.com/33608782/184924270-b1cfd6b1-c48e-4120-bb91-7a077d990388.png)


But it is time-consuming and error-prone to update all of the D2L pytorch notebooks on reader side. 
@AnirudhDagar Please consider adding it as a dep in d2l ASAP.
@gab-chen we'll try to fix this in our next release, maybe we can create a patch release this week to fix this problem. @astonzhang WDYT?

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -2,6 +2,7 @@
 import d2l
 
 requirements = [
+    'ipython>=7.23',
     'jupyter',
     'numpy',
     'matplotlib',


Test patch: