dinov2 icon indicating copy to clipboard operation
dinov2 copied to clipboard

ResolvePackageNotFound: xformers::xformers=0.0.18

Open vitacon opened this issue 2 years ago • 6 comments

Can somebody please explain this? (Windows 10 + Anaconda)

Requirement already satisfied: xformers in c:\users\atc\appdata\roaming\python\python39\site-packages (0.0.18)

versus

ResolvePackageNotFound:
  - xformers::xformers=0.0.18

The full log:

(base) E:\dino-v2>conda env create -f conda.yaml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:
  - xformers::xformers=0.0.18


(base) E:\dino-v2>pip install xformers
Requirement already satisfied: xformers in c:\users\atc\appdata\roaming\python\python39\site-packages (0.0.18)
Requirement already satisfied: pyre-extensions==0.0.23 in c:\users\atc\appdata\roaming\python\python39\site-packages (from xformers) (0.0.23)
Requirement already satisfied: torch==2.0.0 in c:\users\atc\appdata\roaming\python\python39\site-packages (from xformers) (2.0.0)
Requirement already satisfied: numpy in c:\programdata\anaconda3\lib\site-packages (from xformers) (1.21.5)
Requirement already satisfied: typing-inspect in c:\users\atc\appdata\roaming\python\python39\site-packages (from pyre-extensions==0.0.23->xformers) (0.8.0)
Requirement already satisfied: typing-extensions in c:\programdata\anaconda3\lib\site-packages (from pyre-extensions==0.0.23->xformers) (4.3.0)
Requirement already satisfied: sympy in c:\programdata\anaconda3\lib\site-packages (from torch==2.0.0->xformers) (1.10.1)
Requirement already satisfied: networkx in c:\programdata\anaconda3\lib\site-packages (from torch==2.0.0->xformers) (2.8.4)
Requirement already satisfied: jinja2 in c:\programdata\anaconda3\lib\site-packages (from torch==2.0.0->xformers) (2.11.3)
Requirement already satisfied: filelock in c:\programdata\anaconda3\lib\site-packages (from torch==2.0.0->xformers) (3.6.0)
Requirement already satisfied: MarkupSafe>=0.23 in c:\programdata\anaconda3\lib\site-packages (from jinja2->torch==2.0.0->xformers) (2.0.1)
Requirement already satisfied: mpmath>=0.19 in c:\programdata\anaconda3\lib\site-packages (from sympy->torch==2.0.0->xformers) (1.2.1)
Requirement already satisfied: mypy-extensions>=0.3.0 in c:\programdata\anaconda3\lib\site-packages (from typing-inspect->pyre-extensions==0.0.23->xformers) (0.4.3)

(base) E:\dino-v2>conda env create -f conda.yaml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:
  - xformers::xformers=0.0.18


(base) E:\dino-v2>pip install --pre -U xformers
Requirement already satisfied: xformers in c:\users\atc\appdata\roaming\python\python39\site-packages (0.0.18)
Collecting xformers
  Downloading xformers-0.0.19.dev516-cp39-cp39-win_amd64.whl (112.2 MB)
     ---------------------------------------- 112.2/112.2 MB 767.9 kB/s eta 0:00:00
Collecting pyre-extensions==0.0.29
  Downloading pyre_extensions-0.0.29-py3-none-any.whl (12 kB)
Requirement already satisfied: torch==2.0.0 in c:\users\atc\appdata\roaming\python\python39\site-packages (from xformers) (2.0.0)
Requirement already satisfied: numpy in c:\programdata\anaconda3\lib\site-packages (from xformers) (1.21.5)
Requirement already satisfied: typing-extensions in c:\programdata\anaconda3\lib\site-packages (from pyre-extensions==0.0.29->xformers) (4.3.0)
Requirement already satisfied: typing-inspect in c:\users\atc\appdata\roaming\python\python39\site-packages (from pyre-extensions==0.0.29->xformers) (0.8.0)
Requirement already satisfied: filelock in c:\programdata\anaconda3\lib\site-packages (from torch==2.0.0->xformers) (3.6.0)
Requirement already satisfied: networkx in c:\programdata\anaconda3\lib\site-packages (from torch==2.0.0->xformers) (2.8.4)
Requirement already satisfied: jinja2 in c:\programdata\anaconda3\lib\site-packages (from torch==2.0.0->xformers) (2.11.3)
Requirement already satisfied: sympy in c:\programdata\anaconda3\lib\site-packages (from torch==2.0.0->xformers) (1.10.1)
Requirement already satisfied: MarkupSafe>=0.23 in c:\programdata\anaconda3\lib\site-packages (from jinja2->torch==2.0.0->xformers) (2.0.1)
Requirement already satisfied: mpmath>=0.19 in c:\programdata\anaconda3\lib\site-packages (from sympy->torch==2.0.0->xformers) (1.2.1)
Requirement already satisfied: mypy-extensions>=0.3.0 in c:\programdata\anaconda3\lib\site-packages (from typing-inspect->pyre-extensions==0.0.29->xformers) (0.4.3)
Installing collected packages: pyre-extensions, xformers
  Attempting uninstall: pyre-extensions
    Found existing installation: pyre-extensions 0.0.23
    Uninstalling pyre-extensions-0.0.23:
      Successfully uninstalled pyre-extensions-0.0.23
  Attempting uninstall: xformers
    Found existing installation: xformers 0.0.18
    Uninstalling xformers-0.0.18:
      Successfully uninstalled xformers-0.0.18
Successfully installed pyre-extensions-0.0.29 xformers-0.0.19.dev516

(base) E:\dino-v2>conda env create -f conda.yaml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:
  - xformers::xformers=0.0.18


vitacon avatar Apr 19 '23 12:04 vitacon

Windows 10

The code was only tested under a Linux environment (and training and evaluation do require such environment). Some other users have suggested using WSL, but this is also untested.

patricklabatut avatar Apr 19 '23 22:04 patricklabatut

Try this, pip install --pre -U xformers. The dev build of xformers have 0.0.18

Elsword016 avatar Apr 20 '23 07:04 Elsword016

Windows 10

The code was only tested under a Linux environment (and training and evaluation do require such environment). Some other users have suggested using WSL, but this is also untested.

I think I ran into a slightly different problem and this one is just Python/Conda related. Hopefully I made my way around by editing conda.yaml and deleting the line with xformers.

Then I ran this:

conda env create -f conda.yaml 
conda activate dinov2
pip install xformers

It somehow passed and it seemed the xformers 0.0.18 are available. (At least the package can be found in "conda list".]

However, then I finally crashed with the problem you are referring to: pip install --extra-index-url https://pypi.nvidia.com cuml_cu11

Oh well...

vitacon avatar Apr 20 '23 08:04 vitacon

Just for the sake of linking issues, this last problem is mentioned in:

  • #9

woctezuma avatar Apr 20 '23 09:04 woctezuma

I faced the same issue even on a Linux machine go with xFormers. The issue is that there is an internal dependency on the backbone which requires some version of PyTorch which is not compatible with many other things so if you try to write your own implementation of the inference, its fried so yes its still gonna give a warning but it will work.

1ssb avatar Jun 25 '23 04:06 1ssb

Uploading 1703321004160.png…

ywj5782 avatar Dec 23 '23 08:12 ywj5782