1. When using the command pip install magic-pdf[full]
on newer versions of macOS, the error zsh: no matches found: magic-pdf[full]
occurs.
On macOS, the default shell has switched from Bash to Z shell, which has special handling logic for certain types of string matching. This can lead to the "no matches found" error. You can try disabling the globbing feature in the command line and then run the installation command again.
setopt no_nomatch
pip install magic-pdf[full]
This might be due to an incomplete download of the model file. You can try re-downloading the model file and then try again. Reference: opendatalab#143
The path for the model files is configured in "magic-pdf.json". just like:
{
"models-dir": "/tmp/models"
}
This path is an absolute path, not a relative path. You can obtain the absolute path in the models directory using the "pwd" command. Reference: opendatalab#155 (comment)
4. Encountered the error ImportError: libGL.so.1: cannot open shared object file: No such file or directory
in Ubuntu 22.04 on WSL2
The libgl
library is missing in Ubuntu 22.04 on WSL2. You can install the libgl
library with the following command to resolve the issue:
sudo apt-get install libgl1-mesa-glx
Reference: opendatalab#388
You need to uninstall the module and reinstall it:
pip uninstall fairscale
pip install fairscale
Reference: opendatalab#411
6. On some newer devices like the H100, the text parsed during OCR using CUDA acceleration is garbled.
The compatibility of cuda11 with new graphics cards is poor, and the CUDA version used by Paddle needs to be upgraded.
pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu123/
Reference: opendatalab#558
7. On some Linux servers, the program immediately reports an error Illegal instruction (core dumped)
This might be because the server's CPU does not support the AVX/AVX2 instruction set, or the CPU itself supports it but has been disabled by the system administrator. You can try contacting the system administrator to remove the restriction or change to a different server.
References: opendatalab#591 , opendatalab#736
The new version of albumentations (1.4.21) introduces a dependency on simsimd. Since the pre-built package of simsimd for Linux requires a glibc version greater than or equal to 2.28, this causes installation issues on some Linux distributions released before 2019. You can resolve this issue by using the following command:
pip install -U magic-pdf[full,old_linux] --extra-index-url https://wheels.myhloli.com
Reference: opendatalab#1004