D2l on kaggle kernel

how to import d2l on kaggle kernel,as !pip install d2l does not work.while on colab its fine.

I have just tried to import d2l on a fresh Kaggle Kernel and it works fine. The only thing I had to change is to enable Internet in the sidebar. Here is the screenshot.

Notice, that enabling GPU doesn’t allow you to install extra packages… Yet, the whole package of d2l can be copied as a single file from here: https://github.com/d2l-ai/d2l-en/blob/master/d2l/d2l.py and then you can use notebooks separately in the kernel itself.