pytorch / pytorch/vision

old version is installed for arm64 based conda

Open
#5,374 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

🐛 Describe the bug

I installed miniforge for apple silicon with the following specs:

          conda version : 4.11.0
    conda-build version : not installed
         python version : 3.9.7.final.0
               platform : osx-arm64

I then created a conda environment and then install pytorch and torchvision,

conda create --name pytorch_env python=3.9
conda activate pytorch_env
conda install -c pytorch pytorch torchvision

When trying to run this main.py script I get the following error:

from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION 
ImportError: cannot import name 'PILLOW_VERSION' from 'PIL

Looking at the torchvision package version it installed a very old version in-spite of the new pillow and pytorch versions installed

pillow                    9.0.0            py39hcb29f89_0    conda-forge
python                    3.9.10          h38ef502_2_cpython    conda-forge
pytorch                   1.10.1          cpu_py39hbfdb42d_0    conda-forge
torchvision               0.2.2                      py_3    pytorch

After installing the right version as advised on the readme it all worked fine!

conda install torchvision==0.11.2 -c pytorch

But seems the requirements / package dependencies are not aligned as an old version 0.2.2 was installed with new pytorch and pillow versions.

I also did not have this problem when I installed the Intel based miniforge

(more details here)

Versions

conda setup:

          conda version : 4.11.0
    conda-build version : not installed
         python version : 3.9.7.final.0
               platform : osx-arm64

pytorch and python:

pillow                    9.0.0            py39hcb29f89_0    conda-forge
python                    3.9.10          h38ef502_2_cpython    conda-forge
pytorch                   1.10.1          cpu_py39hbfdb42d_0    conda-forge
torchvision               0.2.2                      py_3    pytorch

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.

Research direction

Reproduce the issue with the listed conda commands on an osx-arm64 environment, then inspect the resolved torchvision package metadata and the main.py example mentioned in the report. Check why torchvision 0.2.2 is selected alongside the reported PyTorch and Pillow versions; done means dependency resolution selects a compatible torchvision version without manual pinning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.