Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError when running the official pytorch colab notebook #2250

Closed
gab-chen opened this issue Aug 15, 2022 · 5 comments · Fixed by #2254 or #2279
Closed

ModuleNotFoundError when running the official pytorch colab notebook #2250

gab-chen opened this issue Aug 15, 2022 · 5 comments · Fixed by #2254 or #2279
Assignees
Labels
bug Something isn't working

Comments

@gab-chen
Copy link
Contributor

image

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

@gab-chen
Copy link
Contributor Author

gab-chen commented Aug 15, 2022

As a result, all of the following code cells cannot run because the the name 'd2l' is not defined.

For example,

image

@AnirudhDagar
Copy link
Member

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

@gab-chen
Copy link
Contributor Author

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.

@AnirudhDagar AnirudhDagar added the bug Something isn't working label Aug 15, 2022
@AnirudhDagar AnirudhDagar self-assigned this Aug 15, 2022
@gab-chen
Copy link
Contributor Author

For anyone who is blocked by the error,
you can manually install like below to avoid the error.
!pip install matplotlib-inline
image

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 gab-chen reopened this Aug 16, 2022
@AnirudhDagar
Copy link
Member

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants