from d2l import torch as d2l
--------------------------------------------------------------------------- ModuleNotFoundError
Traceback (most recent call last) in
1 get_ipython ( ) . run_line_magic ( ‘matplotlib’ , ‘inline’ ) ---->
2 from d2l import torch as d2l
3 import torch
4 import random ~\anaconda3\envs\pytorch\lib\site-packages\d2l\torch.py in
17 import tarfile
18 import time
—>19 import requests
20 import zipfile
21 import hashlib
ModuleNotFoundError : No module named ‘requests’
@mli
Is there a way to install all packages advancely we need to import in torch.py or mxnet.py or tensorflow.py?
I guess the reason of No module named ‘requests’ is that mxnet has ‘requests’ defaulty while pytorch not.
d2l requirements
install_requires vs requirements files
hey @StevenJokes , just do a pip install requests
.
I have done this long long ago. Just curious about how to do all this type stuff advancely.
Have found the solution :conda env create -f environment.yml
from handson-ml
Or can we add library “requests” to d2l package?
I have been trying to run these ipynb files of PyTorch but I am getting an error every time I try to run them.
Error is:
Unable to read notebook …ipynb notJSONERROR (notebook does not appear to be json) in Ubuntu.
Could someone help to solve me this error?
Hi @Shashwat , could specify the Ubuntu version you are using? Is it a local installation without GPU?
Shashwat:
ipynb notJSONERROR
@Shashwat
My first search from google: Notebook does not appear to be json · Issue #67 · jupyter/help · GitHub
It may helps you. Can you tell me where do you download there ipynb files?
And more details?
Do you install jupyter?
Maybe you don’t install jupyter book.
Read Project Jupyter | Installing Jupyter . And then you can find these to install jupyter notebook
conda install notebook
or
pip install notebook
Any other problem? Look Do these before you ask! - #11 by StevenJokes . Figure it out by yourself first.
@goldpiggy
I think we don’t tell them to install jupyter at all.
new commit: https://github.com/d2l-ai/d2l-en/pull/1304/commits/198cc5ff657ae15c9c510448ffa73ac8bc19e452
Help me review!
I am using Ubuntu 18.04 with GTX 1050ti graphics card.
Thanks Steven,
I already tried the approaches suggested in https://github.com/jupyter/help/issues/67 . But they were of no help. I even tried renaming them with a .html
extension but it didn’t help either.
I downloaded the ipynb files from https://d2l.ai/index.html from the All notebooks
section.
And yeah I am using Jupyter to run these files.
I still can’t find your real problem. Have you run other .ipynb that is not in this book files before?
@Shashwat
But there is what you can try:
update your jupyter
read again: https://d2l.ai/chapter_appendix-tools-for-deep-learning/jupyter.html
Have you run jupyter notebook
first, then read files in your browser?
install VScode to open it directly: Using Jupyter
read https://forums.fast.ai/t/unreadable-notebook-home-ubuntu-nbs-lesson1-ipynb-notjsonerror-notebook-does-not-appear-to-be-json/2966/9
I guess you choose ipynb files from local disk.
Once all packages are installed, you can open the Jupyter notebook by
jupyter notebook
At this point open http://localhost:8888 (which usually opens automatically) in the browser, then you can view and run the code in each section of the book.
from https://tvm.d2l.ai/
@Shashwat
You’re trying to run the pytorch code that we don’t have now…
Please look this for more details.
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.
kuil
September 9, 2020, 10:18am
13
Hello May be it is very easy problem … I have struggled to solve it but I can’t
I installed torch & torch vision CPU only version as book guided
after installation, I activate virtual env & activate Jupyter notebook and run the code of notebook . I also install requests as your guidance
I met error message like this
OSError: [WinError 126] 지정된 모듈을 찾을 수 없습니다.
Error loading “C:~~\torch\lib\asmjit.dll” or one of its dependencies.
Plz give me a guide to fix it.
@kuil
google first… And convert your language to English next time
python, dll, pytorch
TEX
September 15, 2020, 9:31am
15
@Shashwat Did you have a solution? I have the same problem like you.
In pytorch folder:
I can’t open index.ipynb
I can’t open /chapter_introduction/index.ipynb
…
But, I can open /chapter_optimization/adadelta.ipynb
…
Could someone help me, please?
Because there isn’t any code in index…
@TEX
in my linux, mxnet is cuda-100, why?
from mxnet import npx
plz
click mxnet tab to discuss mxnet next time
why I cannot import ? thanks reply.
** **
Hi @HeartSea15 , please post MXNet installation issue under MXNet tag . You may need to upgrade to MXNet 1.7.
I got the same error when I tried to run notebooks with .ipynb extension. Looking closely at the files listed, I noticed that several files were 0 B in size. Selecting files with valid size (i.e., which have some content in them) works as expected.
It’s not clear to me why the empty files exist in the first place. Perhaps they can be removed. Hope that helps.
TEX
October 16, 2020, 4:33pm
22
Thank you, that helps.
So, I think they should add some content to the zero-byte files, in order to avoid these kind of annoyances.