tristandeleu / pytorch-meta

A collection of extensions and data-loaders for few-shot learning & meta-learning in PyTorch
https://tristandeleu.github.io/pytorch-meta/
MIT License
1.98k stars 256 forks source link

ERROR: ResolutionImpossible #170

Closed cemag1 closed 1 year ago

cemag1 commented 1 year ago

There are still some issues with using torchmeta in colab, please see below. Any ideas?

` Collecting torchmeta Downloading torchmeta-1.8.0-py3-none-any.whl (210 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 210.4/210.4 kB 11.6 MB/s eta 0:00:00 INFO: pip is looking at multiple versions of torchmeta to determine which version is compatible with other requirements. This could take a while. Downloading torchmeta-1.7.0-py3-none-any.whl (181 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.4/181.4 kB 25.3 MB/s eta 0:00:00 Downloading torchmeta-1.6.1-py3-none-any.whl (181 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.4/181.4 kB 25.0 MB/s eta 0:00:00 Downloading torchmeta-1.6.0-py3-none-any.whl (179 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 180.0/180.0 kB 20.3 MB/s eta 0:00:00 Downloading torchmeta-1.5.3-py3-none-any.whl (179 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 179.7/179.7 kB 23.8 MB/s eta 0:00:00 Downloading torchmeta-1.5.2-py3-none-any.whl (179 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 179.5/179.5 kB 19.2 MB/s eta 0:00:00 Downloading torchmeta-1.5.1-py3-none-any.whl (175 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.7/175.7 kB 21.1 MB/s eta 0:00:00 Downloading torchmeta-1.5.0-py3-none-any.whl (172 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 172.6/172.6 kB 22.7 MB/s eta 0:00:00 INFO: pip is looking at multiple versions of torchmeta to determine which version is compatible with other requirements. This could take a while. Downloading torchmeta-1.4.6-py3-none-any.whl (171 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 171.3/171.3 kB 22.1 MB/s eta 0:00:00 Downloading torchmeta-1.4.5-py3-none-any.whl (168 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 168.2/168.2 kB 23.1 MB/s eta 0:00:00 Downloading torchmeta-1.4.4-py3-none-any.whl (167 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 167.6/167.6 kB 22.7 MB/s eta 0:00:00 Downloading torchmeta-1.4.3-py3-none-any.whl (165 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 165.3/165.3 kB 20.7 MB/s eta 0:00:00 Downloading torchmeta-1.4.2-py3-none-any.whl (161 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 161.4/161.4 kB 20.6 MB/s eta 0:00:00 INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C. Downloading torchmeta-1.4.1-py3-none-any.whl (160 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 160.4/160.4 kB 22.4 MB/s eta 0:00:00 Downloading torchmeta-1.4.0-py3-none-any.whl (155 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.5/155.5 kB 22.5 MB/s eta 0:00:00 Downloading torchmeta-1.3.4-py3-none-any.whl (154 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.8/154.8 kB 23.2 MB/s eta 0:00:00 Downloading torchmeta-1.3.3-py3-none-any.whl (145 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 145.7/145.7 kB 20.1 MB/s eta 0:00:00 Downloading torchmeta-1.3.2-py3-none-any.whl (145 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 145.0/145.0 kB 20.5 MB/s eta 0:00:00 Downloading torchmeta-1.3.1-py3-none-any.whl (144 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 144.8/144.8 kB 20.0 MB/s eta 0:00:00 Downloading torchmeta-1.3.0-py3-none-any.whl (144 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 144.7/144.7 kB 20.1 MB/s eta 0:00:00 Downloading torchmeta-1.2.2-py3-none-any.whl (139 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.6/139.6 kB 18.5 MB/s eta 0:00:00 Downloading torchmeta-1.2.1-py3-none-any.whl (139 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.6/139.6 kB 18.6 MB/s eta 0:00:00 Downloading torchmeta-1.2.0-py3-none-any.whl (139 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.6/139.6 kB 19.6 MB/s eta 0:00:00 Downloading torchmeta-1.1.1-py3-none-any.whl (133 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 18.3 MB/s eta 0:00:00 Downloading torchmeta-1.1.0-py3-none-any.whl (133 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.0/133.0 kB 19.4 MB/s eta 0:00:00 ERROR: Cannot install torchmeta==1.1.0, torchmeta==1.1.1, torchmeta==1.2.0, torchmeta==1.2.1, torchmeta==1.2.2, torchmeta==1.3.0, torchmeta==1.3.1, torchmeta==1.3.2, torchmeta==1.3.3, torchmeta==1.3.4, torchmeta==1.4.0, torchmeta==1.4.1, torchmeta==1.4.2, torchmeta==1.4.3, torchmeta==1.4.4, torchmeta==1.4.5, torchmeta==1.4.6, torchmeta==1.5.0, torchmeta==1.5.1, torchmeta==1.5.2, torchmeta==1.5.3, torchmeta==1.6.0, torchmeta==1.6.1, torchmeta==1.7.0 and torchmeta==1.8.0 because these package versions have conflicting dependencies.

The conflict is caused by: torchmeta 1.8.0 depends on torch<1.10.0 and >=1.4.0 torchmeta 1.7.0 depends on torch<1.9.0 and >=1.4.0 torchmeta 1.6.1 depends on torch<1.8.0 and >=1.4.0 torchmeta 1.6.0 depends on torch<1.8.0 and >=1.4.0 torchmeta 1.5.3 depends on torch<1.7.0 and >=1.4.0 torchmeta 1.5.2 depends on torch<1.7.0 and >=1.4.0 torchmeta 1.5.1 depends on torch<1.7.0 and >=1.4.0 torchmeta 1.5.0 depends on torch<1.7.0 and >=1.4.0 torchmeta 1.4.6 depends on torch<1.6.0 and >=1.4.0 torchmeta 1.4.5 depends on torch<1.6.0 and >=1.4.0 torchmeta 1.4.4 depends on torch<1.6.0 and >=1.4.0 torchmeta 1.4.3 depends on torch<1.6.0 and >=1.4.0 torchmeta 1.4.2 depends on torch<1.6.0 and >=1.4.0 torchmeta 1.4.1 depends on torch<1.5.0 and >=1.4.0 torchmeta 1.4.0 depends on torch<1.5.0 and >=1.4.0 torchmeta 1.3.4 depends on torch<1.5.0 and >=1.4.0 torchmeta 1.3.3 depends on torch<1.5.0 and >=1.4.0 torchmeta 1.3.2 depends on torch<1.5.0 and >=1.4.0 torchmeta 1.3.1 depends on torch<1.5.0 and >=1.3.0 torchmeta 1.3.0 depends on torch<1.5.0 and >=1.3.0 torchmeta 1.2.2 depends on torch<1.4.0 and >=1.3.0 torchmeta 1.2.1 depends on torch<1.4.0 and >=1.3.0 torchmeta 1.2.0 depends on torch<1.3.0 and >=1.2.0 torchmeta 1.1.1 depends on torch<1.3.0 and >=1.2.0 torchmeta 1.1.0 depends on torch<1.3.0 and >=1.2.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

ModuleNotFoundError Traceback (most recent call last) in <cell line: 2>() 1 get_ipython().system('pip install torchmeta') ----> 2 from torchmeta.modules import (MetaModule, MetaSequential, MetaLinear)

ModuleNotFoundError: No module named 'torchmeta'


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

`

cemag1 commented 1 year ago

Also:

Collecting torchmeta==1.6.1 Using cached torchmeta-1.6.1-py3-none-any.whl (181 kB) INFO: pip is looking at multiple versions of torchmeta to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement torch<1.8.0,>=1.4.0 (from torchmeta) (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1) ERROR: No matching distribution found for torch<1.8.0,>=1.4.0

ModuleNotFoundError Traceback (most recent call last) Cell In[3], line 2 1 get_ipython().system('pip install torchmeta==1.6.1') ----> 2 from torchmeta.modules import (MetaModule, MetaSequential, MetaLinear)

ModuleNotFoundError: No module named 'torchmeta'

emmanuel-nwogu commented 1 year ago

Hey, did you ever figure this out?

cemag1 commented 1 year ago

No. I found and manually imported the dependencies from the package.

asmit203 commented 1 year ago

So basically it is apprantly working with pytorch 2.x while copy pasting the required codes right ?