0xabu / pdfannots

Extracts and formats text annotations from a PDF file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to install in macOS because of deprecated dependency

memeplex opened this issue · comments

Collecting sklearn (from chronometry->pdf)
  Downloading sklearn-0.0.post12.tar.gz (2.6 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
      rather than 'sklearn' for pip commands.

BTW is it possible to somehow reduce the transitive dependencies? pdfminer is installing hundreds of MB of python sci stack: tensorflow, geopy, scikit and whatnot.

Neither sklearn nor chronometry are dependencies of pdfannots. The only runtime dependency is pdfminer.six, and looking at its dependencies I don't see any obvious path to what you're describing. Either way, I don't believe this is a pdfannots bug.

Yes, looking at it there seems to be no way to do a more selective install of pdfminer and you're not locking its version in setup.py. Thanks anyway.

PS: The installation problem can be worked around with SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True.