Skip to content

Conda environment activation fails on torchvision 0.2.2 dependency #3

@dryutsun

Description

@dryutsun

Environment
Operating System: Pop!_OS 22.04 LTS (Ubuntu Jammy)
conda version : 23.7.3
conda-build version : 3.26.0
python version : 3.11.4.final.0 (per base env)

Bug Description:

When running conda env create -f requirements.yml conda produces this output error.

...
  File "/home/xxxxx/anaconda3/lib/python3.11/site-packages/conda/resolve.py", line 333, in verify_specs
    raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound:
  - torchvision==0.2.2=py_3

To Reproduce

  • Follow instructions on readme.

Expected Behavior

  • Environment activation and requirement installation should complete without error.

Relevant Context

After doing research, it appears that torchvision 0.2.2 does not exist in conda's repositories.

See:
pytorch/vision#7456

missing-torch

Possible Fix & Workaround
Possible change will be to move torchvision==0.2.2=py3 from dependencies to under pip as torchvision==0.2.2 in requirements.yml file.

Additional Considerations

This may just be a local environment issue but invoking python in conda env will not point to version installed in the conda env, leading to import errors.

    import torch
ModuleNotFoundError: No module named 'torch'

Upon explictly invoking python3, all import errors disappeared. Perhaps rewrite README for explicit invocation of python3.


I'd be happy to submit a PR for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions