marker icon indicating copy to clipboard operation
marker copied to clipboard

pip install marker-pdf fails in python 3.13 environment

Open benlooning opened this issue 1 year ago • 6 comments

I tried to install maker-pdf in my python 3.13 environment and got the following error: Requirement already satisfied: numpy<2.0.0,>=1.26.1 in /Users/xxxxxxxxxxx (from marker-pdf) (1.26.4) Collecting scikit-learn<=1.4.2,>=1.3.2 (from marker-pdf) Using cached scikit-learn-1.4.2.tar.gz (7.8 MB) Installing build dependencies ... error error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [9 lines of output] Collecting setuptools Using cached setuptools-75.5.0-py3-none-any.whl.metadata (6.8 kB) Collecting wheel Using cached wheel-0.45.0-py3-none-any.whl.metadata (2.3 kB) Collecting Cython>=3.0.8 Using cached Cython-3.0.11-py2.py3-none-any.whl.metadata (3.2 kB) ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11; 1.26.0 Requires-Python <3.13,>=3.9; 1.26.1 Requires-Python <3.13,>=3.9 ERROR: Could not find a version that satisfies the requirement numpy==2.0.0rc1 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4, 1.25.0, 1.25.1, 1.25.2, 1.26.2, 1.26.3, 1.26.4, 2.0.0, 2.0.1, 2.0.2, 2.1.0rc1, 2.1.0, 2.1.1, 2.1.2, 2.1.3) ERROR: No matching distribution found for numpy==2.0.0rc1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I tried to install several numpy versions but it doesn't resolve th issue.

benlooning avatar Nov 19 '24 20:11 benlooning

I used 3.10 and it worked. If you get a TypeError for PDFdocument then search the tickets and you might need to pip install pdftext==0.3.7.

ryansnowden avatar Nov 20 '24 08:11 ryansnowden

I'm also encoutering this same error. Should I downgrade my python?

bruno-ortiz avatar Dec 02 '24 20:12 bruno-ortiz

I'm also encoutering this same error on Windows, but it works on Linux. I guess it's just because torch/safetensors/something else doesn't have a Windows wheel on 3.13? (2024.12.7)

CNSeniorious000 avatar Dec 07 '24 06:12 CNSeniorious000

I have the same issue with 3.13

shog86 avatar Dec 16 '24 04:12 shog86

According to the Pytorch website, it is recommended that you use Python 3.9 - 3.12 to install torch. I think this error has something to do with it. Downgrade python and try again.

AkhilParim avatar Dec 18 '24 19:12 AkhilParim

Workaround:

Install pipx and python 3.12. I did this on my Mac with homebrew: brew install [email protected] pipx

Then use pipx to install marker using the python 3.12 binary: pipx install marker-pdf --python python3.12

mikeweinberg avatar Dec 26 '24 00:12 mikeweinberg