Pytorch >=2.6 and Numpy > 2 compatibility #15539
patrickmappedin
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am a newcomer to PaddleOCR from EasyOCR. I've been pleased to see the substantial increase in capability, particularly for detection and recognition of very small or blurry text. Thank you for bringing this project to the community.
One issue I've encountered that has been challenging for integration with my own existing project is that PaddleOCR (including 3.0.0) dependencies are incompatible with Pytorch >=2.6 and Numpy >2. Pytorch 2.6.0 and above require nvidia-nccl-cu12==2.26.2 while paddlepaddle-gpu==3.0.0 requires version 2.25.1. PaddleX 3.0.0 currently requires numpy < 2. It appears that there was an attempt to upgrade to using numpy 2.0 shortly after it was released last summer but this was causing problems with unit tests/CI (PaddlePaddle/Paddle#64905), and so was instead restricted to Numpy < 2. Pandas is being restricted to 1.5.3 accordingly. Langchain (0.2.17 used by paddlex 3.0.0) also requires Numpy < 2. At best, the only way to rectify this is to move to a version of langchain and langchain-community (the latest is 2.2.4) but that also requires updating python 3.13.
I have personally tested paddleocr 3.0.0, paddlepaddle-gpu 3.0.0, paddlex 3.0.0 with nvidia-nccl-cu12==2.26.2 and numpy==2.0.1 (with langchain and langchain-community modified to use this numpy) and have not encountered any problems using general OCR. I can find a work around for my case, but besides it being more convenient to have a general solution, I think it would be valuable to keep moving PaddleOCR forward to align with modern versions of these popular core frameworks.
Beta Was this translation helpful? Give feedback.
All reactions