pytorch / pytorch/vision

torchvision conda package missing requests dependency

Open
#4,917 10 comments 0 reactions 1 assignee View on GitHub

@pmeier is already working on this.

Since Nov 23, 2021.

Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🐛 Describe the bug

torchvision depends on requests, but it is not specified as conda package dependency, which results in the following failures:

% python
Python 3.8.11 (default, Aug  6 2021, 08:56:27) 
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from torchvision import datasets
>>> calldetch_ds = datasets.Caltech101("datasets", download=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/nshulga/miniconda3/envs/py_38/lib/python3.8/site-packages/torchvision/datasets/caltech.py", line 52, in __init__
    self.download()
  File "/Users/nshulga/miniconda3/envs/py_38/lib/python3.8/site-packages/torchvision/datasets/caltech.py", line 124, in download
    download_and_extract_archive(
  File "/Users/nshulga/miniconda3/envs/py_38/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 427, in download_and_extract_archive
    download_url(url, download_root, filename, md5)
  File "/Users/nshulga/miniconda3/envs/py_38/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 135, in download_url
    return download_file_from_google_drive(file_id, root, filename, md5)
  File "/Users/nshulga/miniconda3/envs/py_38/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 204, in download_file_from_google_drive
    import requests
ModuleNotFoundError: No module named 'requests'
Versions

0.11.1 on MacOS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.