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
23.36k stars 4.29k forks source link

Notebooks are not working on Colab #2546

Closed lithuak closed 1 year ago

lithuak commented 1 year ago

Trying to run the very first cell (in any notebook):

!pip install d2l==1.0.0-beta0

I get the following error:

Collecting d2l==1.0.0-beta0
  Using cached d2l-1.0.0b0-py3-none-any.whl (141 kB)
Collecting jupyter (from d2l==1.0.0-beta0)
  Using cached jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from d2l==1.0.0-beta0) (1.23.5)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from d2l==1.0.0-beta0) (3.7.1)
Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.10/dist-packages (from d2l==1.0.0-beta0) (0.1.6)
Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from d2l==1.0.0-beta0) (2.31.0)
Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from d2l==1.0.0-beta0) (1.5.3)
Collecting gym==0.21.0 (from d2l==1.0.0-beta0)
  Using cached gym-0.21.0.tar.gz (1.5 MB)
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

It's not possible to run notebooks right now.

AnirudhDagar commented 1 year ago

Yea, we are aware of that. We are in the process of making a release and then we will also upload the d2l package to pypi.

Till then if you want to run the d2l colab notebooks, just replace

!pip install d2l==1.0.0-beta0

with

!pip install git+https://github.com/d2l-ai/d2l-en.git
lithuak commented 1 year ago

Thanks @AnirudhDagar !

AnirudhDagar commented 1 year ago

Closing this since we've made a new release recently and the issue has been fixed with the latest version of d2l. !pip install d2l==1.0.3