When Im trying to install easyocr i get an error

3.9k Views Asked by At

As a result I get this error:

pip install easyocr

ERROR: Cannot install easyocr==1.0, easyocr==1.1, easyocr==1.1.1, easyocr==1.1.10, easyocr==1.1.2, easyocr==1.1.3, easyocr==1.1.4, easyocr==1 .1.5, easyocr==1.1.6, easyocr==1.1.7, easyocr==1.1.8, easyocr==1.1.9, easyocr==1.2, easyocr==1.2.1, easyocr==1.2.2, easyocr==1.2.3, easyocr== 1.2.4, easyocr==1.2.5, easyocr==1.2.5.1, easyocr==1.3, easyocr==1.3.0.1, easyocr==1.3.1, easyocr==1.3.2, easyocr==1.4, easyocr==1.4.1, easyoc r==1.4.2, easyocr==1.5.0, easyocr==1.6.0, easyocr==1.6.1 and easyocr==1.6.2 because these package versions have conflicting dependencies.

The conflict is caused by: easyocr 1.6.2 depends on torch easyocr 1.6.1 depends on torch easyocr 1.6.0 depends on torch easyocr 1.5.0 depends on torch easyocr 1.4.2 depends on torch easyocr 1.4.1 depends on torch easyocr 1.4 depends on torch easyocr 1.3.2 depends on torch easyocr 1.3.1 depends on torch easyocr 1.3.0.1 depends on torch easyocr 1.3 depends on torch easyocr 1.2.5.1 depends on torch easyocr 1.2.5 depends on torch easyocr 1.2.4 depends on torch easyocr 1.2.3 depends on torch easyocr 1.2.2 depends on torch easyocr 1.2.1 depends on torch easyocr 1.2 depends on torch easyocr 1.1.10 depends on torch easyocr 1.1.9 depends on torch easyocr 1.1.8 depends on torch easyocr 1.1.7 depends on torch easyocr 1.1.6 depends on torch easyocr 1.1.5 depends on torch easyocr 1.1.4 depends on torch easyocr 1.1.3 depends on torch easyocr 1.1.2 depends on torch easyocr 1.1.1 depends on torch easyocr 1.1 depends on torch easyocr 1.0 depends on torch

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

I tried to follow the example as indicated in the instructions, but this caused additional errors

python -m pip install "pytest < 4.6" pytest-cov==2.12.1

ERROR: Cannot install pytest-cov==2.12.1 and pytest<4.6 because these package versions have conflicting dependencies.

The conflict is caused by: The user requested pytest<4.6 pytest-cov 2.12.1 depends on pytest>=4.6

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

Maybe there is some solution to this error? Thanks

3

There are 3 best solutions below

0
On

Downgrade your python version to 3.8, it worked for me. Don't use python 3.9 or higher

0
On

From the comment, it seems like installing pytorch for you failed. Based on my own experience, I managed to resolve this error by downgrading python. Pytorch does not support 3.10 and older, so I recommend downbgrading to either 3.9 or 3.8

0
On

Try to install pytorch through conda,

conda install pytorch torchvision torchaudio -c pytorch

enter image description here