question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

torchvision conda package missing requests dependency

See original GitHub issue

🐛 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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
datumboxcommented, Nov 23, 2021

@pmeier Would you be interested in sending a PR that fixes this? Perhaps taking the time to update the CI scripts from installing the dependencies separately?

1reaction
NicolasHugcommented, Nov 23, 2021

I would go with option 2 as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install pytorch in conda due to setuptools is a ...
1 Answer 1 · Create a conda environment using the command : conda create -n my_env python=3.6 · Activate the environment. source activate...
Read more >
Developers - torchvision conda package missing requests ...
torchvision depends on requests, but it is not specified as conda package dependency, which results in the following failures:
Read more >
Issues installing pytorch for OS X with conda
Solving package specifications: PackageNotFoundError: Package not found: '' Dependencies missing in current osx-64 channels: - pytorch ...
Read more >
torchvision - PyPI
Python linking is disabled by default when compiling TorchVision with CMake, this allows you to run models without any Python dependency. In some...
Read more >
Install the Azure Machine Learning SDK for Python
Other azureml packages. The SDK contains many other optional packages that you can install. These include dependencies that aren't required for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found