Error when running pip install d2l==1.0.3

Hi, sorry for the noob question. I am following instructions in the “Installation” section of the book and am running into problem when running the following command:

pip install d2l==1.0.3

The error message seems to complain about pkgutil having no attribute “ImpImporter”. Attached is the screenshot.


According to the following:

python - AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? - Stack Overflow.

Problem is with version 3.12 of Python. Creating a conda environment with version 3.11 of Python does not run into the issue above.