Layout-Parser / layout-parser

A Unified Toolkit for Deep Learning Based Document Image Analysis
https://layout-parser.github.io/
Apache License 2.0
4.64k stars 449 forks source link

Unable to install, at least on Alpine Linux #213

Closed bryankaplan closed 3 days ago

bryankaplan commented 3 days ago

Describe the bug

I am attempting to install under Alpine Linux.

$ pip install layoutparser
[…]
    import distutils.core                                                       
ModuleNotFoundError: No module named 'distutils'

That makes sense, because distutils has been removed from python as per PEP 632. It would appear setuptools is a dependency, so I installed that and retried.

$ pip install setuptools
[…]
Successfully installed setuptools-70.2.0

$ pip install layoutparser
[…]
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

Here's the traceback.

Checklist

To Reproduce Steps to reproduce the behavior:

  1. Use Alpine.
  2. Create and activate a virtual environment.
  3. Attempt to pip install layoutparser.

Environment

  1. Platform: Alpine Linux v3.20
  2. Layout Parser version: 0.3.4

Error traceback https://paste.rs/11Fje

bryankaplan commented 3 days ago

I opened this ticket too hastily. It's actually opencv-python bug #988.