Installation

Recommend my post:
Do these before you ask
The newest book and d2l package
My repo recording all my learning: https://github.com/StevenJokes/d2l-en-read

Hello,

Maybe my question seems silly. I never used MXNET before and I prefer Tensorflow, but I can’t open some implementation in Tensorflow. In the explorer, it shows .ipynb file size is 0KB and in the jupyter notebook, shows error “Unreadable Notebook: D:\Python scripts\d2l-en\tensorflow\chapter_generative-adversarial-networks\dcgan.ipynb NotJSONError(“Notebook does not appear to be JSON: ‘’…”)”. Help me. Btw, mxnet implementation works okay.

@melo

You can check the chapter DCGAN, then you will find that there isn’t tensorflow code now.
:sweat_smile:

You can join us to translate from mxnet to tensorflow.
I’m translating DCGAN from mxnet to pytorch, but still stuck.

Oh I see :slight_smile:
Unfortunately I am new to MXNET, I afraid I can’t.

Thanks for response.

@melo
:rofl:
I’m new to pytorch and mxnet too.
Then I have translated GAN from pytorch and mxnet.

If you follow the book step by step, I think it won’t be hard for you.

And I found Chapter 17. Representation Learning and Generative Learning Using Autoencoders and GANs: https://learning.oreilly.com/library/view/hands-on-machine-learning/9781492032632/ch17.html#idm45728442616808

Maybe it will help you if you are a member of Oreilly or ACM.

Hi, I am new to this. I have just installed miniconda on Widdows. How to perform the next step?

  1. Download the corresponding Miniconda sh file from the website and then execute the installation from the command line using sh <FILENAME> -b .
  2. Download the D2L notebook?

Open your cmd(win+r then cmd)
Do next

It seems that tensorflow does not have a build for python3.9, so when I type(I don’t know if comment pages support markdown rendering)

pip install tensorflow

It shows the result below.


The solution is to downgrade python3.9 to 3.8 in the virtual env. Or specify python version when creating d2l env.

conda create --name d2l python=3.8

After downgrading my python version to 3.85, everything works fine.

Hi @woshiZS, great catch! Thanks for reporting the potential issues!

Hello, has anyone else come across this issue with using the Jupyter notebook, I have a dead kernel

This issue has been resolved, I had to install Ipython while in the d2l environment

Minor correction on Section: Downloading the D2L Notebooks
Windows cmd is “del” and not “rm”

mkdir d2l-en && cd d2l-en
curl https://d2l.ai/d2l-en.zip -o d2l-en.zip
unzip d2l-en.zip && rm d2l-en.zip

unzip d2l-en.zip && del d2l-en.zip

Hi, I have a question if I try to install tensorflow and then d2l, I get the following conflict

ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
d2l 0.17.3 requires numpy==1.18.5, but you have numpy 1.22.2 which is incompatible.

If I try it the other way around I get the problem with tensorflow.

Use pip install tensorflow tensorflow-probability numpy==1.18.5

typo on this page: “we can the Jupyter notebook server by running”

Just a minor issue.
Following Installation I installed Miniconda, tensorflow and d2l (1.0.0a1.post0 !) for Windows 11.
The notebook works well so far except that labels, cites etc. don’t work. They just show up as ‘:label: xxx’, ‘:cite: xxx’, etc.
Is there a fix for this?

In case you run into this error:

/////////////////////////////////////// BEGIN OF ERROR //////////////////////////////
(d2l) user@user:~$ pip install d2l==1.0.0b0
Collecting d2l==1.0.0b0
Using cached d2l-1.0.0b0-py3-none-any.whl (141 kB)
Collecting jupyter (from d2l==1.0.0b0)
Using cached jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Requirement already satisfied: numpy in ./anaconda3/envs/d2l/lib/python3.9/site-packages (from d2l==1.0.0b0) (1.23.5)
Collecting matplotlib (from d2l==1.0.0b0)
Using cached matplotlib-3.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
Collecting matplotlib-inline (from d2l==1.0.0b0)
Using cached matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Requirement already satisfied: requests in ./anaconda3/envs/d2l/lib/python3.9/site-packages (from d2l==1.0.0b0) (2.31.0)
Collecting pandas (from d2l==1.0.0b0)
Using cached pandas-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 MB)
Collecting gym==0.21.0 (from d2l==1.0.0b0)
Using cached gym-0.21.0.tar.gz (1.5 MB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in gym setup command: ‘extras_require’ must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
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.
/////////////////////////////////////// END OF ERROR //////////////////////////////

The solution is to upgrade setuptools to this version, like this:

pip install --upgrade pip setuptools==57.5.0

2 Likes

Seems not work again, maybe a bug between gym and setuptools. Hope d2l can update gym soon

Please see above.
i updated miniconda, pip, the modules and d2l to the most recent versions, but still no change.

d2l

In the log i find:

[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control
[IPKernelApp] WARNING | No such comm: 8ed5a5be-caea-4ba4-9d8a-acf6a9639c3e

Any ideas?