Giter Site home page Giter Site logo

Comments (6)

VikParuchuri avatar VikParuchuri commented on August 15, 2024

Thanks for reporting, will look into this.

from marker.

emcmanus avatar emcmanus commented on August 15, 2024

Quick steps to get started with 3.10 on macos

brew install [email protected]
python3.10 -m pip install poetry
python3.10 -m poetry install
python3.10 -m poetry shell

# ready to use
python3.10 convert_single.py .... # Or convert.py

from marker.

VikParuchuri avatar VikParuchuri commented on August 15, 2024

I don't have python 3.9 handy to easily test, but I fixed the issue with the pipe char (replaced it with Optional).

from marker.

samuell avatar samuell commented on August 15, 2024

Indeed. There are other Python 3.9 incompatibilities, such as the use of the match/case syntax, which reportedly is available only since 3.10:

Traceback (most recent call last):
  File "/home/samuel/opt/marker/convert_single.py", line 3, in <module>
    from marker.convert import convert_single_pdf
  File "/home/samuel/opt/marker/marker/convert.py", line 4, in <module>
    from marker.extract_text import get_text_blocks
  File "/home/samuel/opt/marker/marker/extract_text.py", line 6, in <module>
    from marker.ocr.page import ocr_entire_page
  File "/home/samuel/opt/marker/marker/ocr/page.py", line 16
    match settings.OCR_ENGINE:
          ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "/home/samuel/opt/marker/convert_single.py", line 3, in <module>
    from marker.convert import convert_single_pdf
  File "/home/samuel/opt/marker/marker/convert.py", line 12, in <module>
    from marker.markdown import merge_spans, merge_lines, get_full_text
  File "/home/samuel/opt/marker/marker/markdown.py", line 68
    match block_type:
          ^
SyntaxError: invalid syntax

from marker.

timothyasp avatar timothyasp commented on August 15, 2024

Also getting this with 3.9 - but when trying with 3.10 getting pydantic errors.

ImportError: cannot import name 'field_validator' from 'pydantic' (/usr/local/lib/python3.10/site-packages/pydantic/__init__.cpython-310-darwin.so)

from marker.

timothyasp avatar timothyasp commented on August 15, 2024

Looks like there's some more 3.9 bugs from the most recent commit -

Traceback (most recent call last):
  File "/Users/tasp/Code/projects/marker/convert_single.py", line 3, in <module>
    from marker.convert import convert_single_pdf
  File "/Users/tasp/Code/projects/marker/marker/convert.py", line 4, in <module>
    from marker.extract_text import get_text_blocks
  File "/Users/tasp/Code/projects/marker/marker/extract_text.py", line 6, in <module>
    from marker.ocr.page import ocr_entire_page
  File "/Users/tasp/Code/projects/marker/marker/ocr/page.py", line 16
    match settings.OCR_ENGINE:
          ^
SyntaxError: invalid syntax

from marker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.