Unable to download dataset

44_Pashikanti_Pranit: <p>It is just downloading and the process is not finishing can you guys help me out and it is showing this error which i have attached in a second image and i have tried the user agent command to download the dataset what can i do this to solve this issue .</p>
<p><strong>from six.moves import urllib</strong><br>
<strong>opener = urllib.request.build_opener()</strong><br>
<strong>opener.addheaders = [(‘User-agent’, ‘Mozilla/5.0’)]</strong><br>
<strong>urllib.request.install_opener(opener)</strong></p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/d/2/d24e96725c91fef939b4413ff07de49ac2169b10.png" data-download-href="https://discuss.pytorch.org/uploads/default/d24e96725c91fef939b4413ff07de49ac2169b10" title="Screenshot (250)"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/d/2/d24e96725c91fef939b4413ff07de49ac2169b10_2_690x388.png" alt="Screenshot (250)" data-base62-sha1="u0sDOkYJ1WZkWGRephcDTVUJeHS" width="690" height="388" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/d/2/d24e96725c91fef939b4413ff07de49ac2169b10_2_690x388.png, https://discuss.pytorch.org/uploads/default/optimized/3X/d/2/d24e96725c91fef939b4413ff07de49ac2169b10_2_1035x582.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/d/2/d24e96725c91fef939b4413ff07de49ac2169b10_2_1380x776.png 2x" data-dominant-color="1F1C21"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot (250)</span><span class="informations">1920×1080 243 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

InnovArul: <p>Do you mind sharing the notebook link?<br>
Recently it worked for me. Probably, you might need to reload the notebook and try again.</p>

ptrblck: <p>This is a known issue and should be resolved in the nightly <code>torchvision</code> release as explained <a href="https://discuss.pytorch.org/t/iam-not-able-to-download-dataset-from-torchvision/113643/2">here</a>.</p>

44_Pashikanti_Pranit: <p>i have tried that thing and it his showing me different  error this time it was showing 403 forbidden and this time 503 service unavailable as you can see in both the pictures the error is different.</p>

44_Pashikanti_Pranit: <p>here is the <a href="https://colab.research.google.com/drive/1u2fHUjdmnsrtCv1W7acp9mYAoaOSw-f8?usp=sharing" rel="noopener nofollow ugc">link</a>.i have to admit that it is kinda working but it is not working on a full scale yet. I mean it is taking long time to download the dataset and i tried after sometime it is not happening can u tell th e proper way to do it<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/9/490fd720d16f3b83c51f15bab2a9e5ce92ddd4a1.png" data-download-href="https://discuss.pytorch.org/uploads/default/490fd720d16f3b83c51f15bab2a9e5ce92ddd4a1" title="Screenshot (252)"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/4/9/490fd720d16f3b83c51f15bab2a9e5ce92ddd4a1_2_690x388.png" alt="Screenshot (252)" data-base62-sha1="aqkNaLKnTUZAp1AsLYwKLFbLo1H" width="690" height="388" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/4/9/490fd720d16f3b83c51f15bab2a9e5ce92ddd4a1_2_690x388.png, https://discuss.pytorch.org/uploads/default/optimized/3X/4/9/490fd720d16f3b83c51f15bab2a9e5ce92ddd4a1_2_1035x582.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/4/9/490fd720d16f3b83c51f15bab2a9e5ce92ddd4a1_2_1380x776.png 2x" data-dominant-color="1E1A20"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot (252)</span><span class="informations">1920×1080 143 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

ptrblck: <p>This should also be addressed by hosting the MNIST dataset directly in <a href="https://github.com/pytorch/vision/pull/3544">this PR</a>.</p>

44_Pashikanti_Pranit: <p>can you show me or attach any refference i am not able to understand in that link</p>

ptrblck: <p>You can install the latest nightly binaries via e.g.:</p>
<pre><code class="lang-python">conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch-nightly
</code></pre>
<p>and the download would work again using the other mirrors:</p>
<pre><code class="lang-python">import torch
import torchvision
import torchvision.datasets as datasets

print(torch.__version__)
print(torchvision.__version__)

dataset = datasets.MNIST(root='./data', download=True)
</code></pre>
<p>Output:</p>
<pre><code class="lang-python">1.9.0.dev20210315
0.9.0.dev20210315
Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to ./data/MNIST/raw/train-images-idx3-ubyte.gz
Failed to download (trying next):
HTTP Error 503: Service Unavailable

Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz
Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz to ./data/MNIST/raw/train-images-idx3-ubyte.gz
100.0%
Extracting ./data/MNIST/raw/train-images-idx3-ubyte.gz to ./data/MNIST/raw

Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
Failed to download (trying next):
HTTP Error 503: Service Unavailable

Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz
Downloading https://ossci-datasets.s3.amazonaws.com/mnist/train-labels-idx1-ubyte.gz to ./data/MNIST/raw/train-labels-idx1-ubyte.gz
102.8%
Extracting ./data/MNIST/raw/train-labels-idx1-ubyte.gz to ./data/MNIST/raw

Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
Failed to download (trying next):
HTTP Error 503: Service Unavailable

Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz
Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz to ./data/MNIST/raw/t10k-images-idx3-ubyte.gz
100.0%
Extracting ./data/MNIST/raw/t10k-images-idx3-ubyte.gz to ./data/MNIST/raw

Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
Failed to download (trying next):
HTTP Error 503: Service Unavailable

Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz
Downloading https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz to ./data/MNIST/raw/t10k-labels-idx1-ubyte.gz
112.7%
Extracting ./data/MNIST/raw/t10k-labels-idx1-ubyte.gz to ./data/MNIST/raw

Processing...
Done!
</code></pre>

44_Pashikanti_Pranit: <p>what should be the command for google colab because im not working in conda</p>

ptrblck: <p>I think you could install the pip wheels via <code>!pip install</code> using the install command from <a href="https://pytorch.org/get-started/locally/">here</a>.</p>

44_Pashikanti_Pranit: <p>I am getting this error and if mention the cuda command then it is showing me this error</p>
<p><code>ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'pytorch-nightly'</code></p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/c/9/c99aa041110560fd7bc341df4c5c70d84e290c60.png" data-download-href="https://discuss.pytorch.org/uploads/default/c99aa041110560fd7bc341df4c5c70d84e290c60" title="Screenshot (254)"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/c/9/c99aa041110560fd7bc341df4c5c70d84e290c60_2_690x388.png" alt="Screenshot (254)" data-base62-sha1="sLtfSUSYS6VlZiqkQ6pyv05yAZa" width="690" height="388" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/c/9/c99aa041110560fd7bc341df4c5c70d84e290c60_2_690x388.png, https://discuss.pytorch.org/uploads/default/optimized/3X/c/9/c99aa041110560fd7bc341df4c5c70d84e290c60_2_1035x582.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/c/9/c99aa041110560fd7bc341df4c5c70d84e290c60_2_1380x776.png 2x" data-dominant-color="221C23"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot (254)</span><span class="informations">1920×1080 155 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

ptrblck: <p>You are missing the conda and pip commands. To install the nightly pip wheels with CUDA10.2 use:</p>
<pre><code class="lang-auto">pip install --pre torch torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html
</code></pre>
<p>as described in the link.</p>

44_Pashikanti_Pranit: <p>I have tried it and it is working fine for the first day but the problem ccontinues on today can you have some alternate solution to try <div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/5/1/5113b0bb9d3c4168f5fff0dae346fe616c05eea7.png" data-download-href="https://discuss.pytorch.org/uploads/default/5113b0bb9d3c4168f5fff0dae346fe616c05eea7" title="Screenshot (255)"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/5113b0bb9d3c4168f5fff0dae346fe616c05eea7_2_690x388.png" alt="Screenshot (255)" data-base62-sha1="bzeRpEUSjrbKvl0DwePomOEAyz5" width="690" height="388" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/5113b0bb9d3c4168f5fff0dae346fe616c05eea7_2_690x388.png, https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/5113b0bb9d3c4168f5fff0dae346fe616c05eea7_2_1035x582.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/5113b0bb9d3c4168f5fff0dae346fe616c05eea7_2_1380x776.png 2x" data-dominant-color="1D1A20"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot (255)</span><span class="informations">1920×1080 115 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

ptrblck: <p>Your current environment uses <code>torchvision==0.9.0</code>, so you would have to reinstall the nightly again.</p>

44_Pashikanti_Pranit: <p>i have reinstalled but it continuing the same error</p>

ptrblck: <p>Could you print the <code>torchvision.__version__</code> after reinstalling the nightly binary as well as the error message you are seeing?</p>