Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocr_perturbation requirements issues #320

Open
Saad-Mahamood opened this issue Oct 9, 2021 · 2 comments
Open

ocr_perturbation requirements issues #320

Saad-Mahamood opened this issue Oct 9, 2021 · 2 comments

Comments

@Saad-Mahamood
Copy link
Collaborator

The ocr_perturbation package requires trdg==1.6.0. However, under macOS 11.6 with Python 3.9 it will not install due to a dependency on pillow==7.0.0, which generates a RequiredDependencyException: zlib error.

Installing pillow==8.3.2 works fine but is too new for trdg==1.6.0.

Installing trdg==1.7.0 has a dependency conflicts with opencv-python:

ERROR: Cannot install opencv-python==4.5.3.56, trdg and trdg==1.7.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    trdg 1.7.0 depends on numpy<1.17 and >=1.16.4
    opencv-python 4.5.3.56 depends on numpy>=1.19.3
    trdg 1.7.0 depends on numpy<1.17 and >=1.16.4
    opencv-python 4.5.2.54 depends on numpy>=1.19.3
    trdg 1.7.0 depends on numpy<1.17 and >=1.16.4
    opencv-python 4.5.2.52 depends on numpy>=1.19.3
    trdg 1.7.0 depends on numpy<1.17 and >=1.16.4
    opencv-python 4.5.1.48 depends on numpy>=1.19.3
    trdg 1.7.0 depends on numpy<1.17 and >=1.16.4
    opencv-python 4.4.0.46 depends on numpy>=1.19.3
    trdg 1.7.0 depends on numpy<1.17 and >=1.16.4
    opencv-python 4.4.0.42 depends on numpy>=1.17.3
    trdg 1.7.0 depends on numpy<1.17 and >=1.16.4
    opencv-python 4.4.0.40 depends on numpy>=1.17.3
    trdg 1.7.0 depends on numpy<1.17 and >=1.16.4
    opencv-python 4.3.0.38 depends on numpy>=1.17.3
@AbinayaM02
Copy link
Collaborator

@mnamysl: Please look into this issue.

@mnamysl
Copy link
Contributor

mnamysl commented Oct 12, 2021

Hi @Saad-Mahamood. Thank you for reporting this issue.

As you already noticed, the problem is caused by the mutually exclusive dependencies: trdg 1.7.0 requires numpy<1.17 and >=1.16.4 and opencv-python 4.5.2.54 requires numpy>=1.19.3.

On the other hand, trdg 1.6.0 requires numpy>=1.17.3 but it puts a strict requirement on the Pillow package: pillow==7.0.0.

I tested both setups using Docker with a Python3.9 base image and the current version that uses trdg 1.6.0 seems to work fine, although I had to additionally install the libjpeg system package (apt-get install -y libjpeg-dev).

If you experience problems with zlib, please make sure that it is installed. Under Debian-based Linux systems, you could use:
apt-get install zlib1g-dev and probably brew install zlib or brew install zlib-devel on Mac OS.

Please let me know if that helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants