d2l-ai / d2l-en

Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 500 universities from 70 countries including Stanford, MIT, Harvard, and Cambridge.
https://D2L.ai
Other
22.45k stars 4.19k forks source link

AttributeError: partially initialized module 'charset_normalizer' has no attribute 'md__mypyc' (most likely due to a circular import) #2602

Open Nevermetyou65 opened 1 month ago

Nevermetyou65 commented 1 month ago

Hello,

I am reading chapter 9 of d2l. I tried to import libraries as followed

%matplotlib inline
import torch
from torch import nn
from d2l import torch as d2l

But I got error AttributeError: partially initialized module 'charset_normalizer' has no attribute 'md__mypyc' (most likely due to a circular import)

I am using pytorch 2.3 and d2l==1.0.3