AllenNLP installation issue - No matching distribution found for torchvision<0.9.0,>=0.8.1

As per demos, we are expected to install AllenNLP using following command:

pip install allennlp==2.1.0 allennlp-models==2.1.0

But it always throws error:

  ERROR: Could not find a version that satisfies the requirement torchvision0.9.0,=0.8.1 (from allennlp==2.1.0) (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.3.0, 0.4.1, 0.5.0, 0.9.0, 0.9.1, 0.10.0)
ERROR: No matching distribution found for torchvision0.9.0,=0.8.1 (from allennlp==2.1.0)

Have tried installing torchvision separately but the version demanded by AllenNLP is not available at all. As can be seen in error above the torchvision0.9.0,=0.8.1 is demanded, but the available versions are ... 0.5.0, 0.9.0 ...

What am I missing ?

Topic allennlp

Category Data Science


Finally it worked using this command:

conda install torchvision==0.8.2 -c pytorch

then:

pip install allennlp==2.1.0 allennlp-models==2.1.0

I can see in the link that there are versions 0.8.1 and 0.8.2 which satisfy your requirement.

enter image description here

So just try installing with version -

pip install torchvision==0.8.2

Better if you do it in a virtual environment.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.