faq.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. 常见问题解答
  2. ============
  3. 1.在较新版本的mac上使用命令安装pip install magic-pdf[full] zsh: no matches found: magic-pdf[full]
  4. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. 在 macOS 上,默认的 shell 从 Bash 切换到了 Z shell,而 Z shell 对于某些类型的字符串匹配有特殊的处理逻辑,这可能导致no matches found错误。 可以通过在命令行禁用globbing特性,再尝试运行安装命令
  6. .. code:: bash
  7. setopt no_nomatch
  8. pip install magic-pdf[full]
  9. 2.使用过程中遇到_pickle.UnpicklingError: invalid load key, ‘v’.错误
  10. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11. 可能是由于模型文件未下载完整导致,可尝试重新下载模型文件后再试。参考:https://github.com/opendatalab/MinerU/issues/143
  12. 3.模型文件应该下载到哪里/models-dir的配置应该怎么填
  13. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14. 模型文件的路径输入是在”magic-pdf.json”中通过
  15. .. code:: json
  16. {
  17. "models-dir": "/tmp/models"
  18. }
  19. 进行配置的。这个路径是绝对路径而不是相对路径,绝对路径的获取可在models目录中通过命令 “pwd” 获取。
  20. 参考:https://github.com/opendatalab/MinerU/issues/155#issuecomment-2230216874
  21. 4.在WSL2的Ubuntu22.04中遇到报错\ ``ImportError: libGL.so.1: cannot open shared object file: No such file or directory``
  22. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  23. WSL2的Ubuntu22.04中缺少\ ``libgl``\ 库,可通过以下命令安装\ ``libgl``\ 库解决:
  24. .. code:: bash
  25. sudo apt-get install libgl1-mesa-glx
  26. 参考:https://github.com/opendatalab/MinerU/issues/388
  27. 5.遇到报错 ``ModuleNotFoundError : Nomodulenamed 'fairscale'``
  28. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. 需要卸载该模块并重新安装
  30. .. code:: bash
  31. pip uninstall fairscale
  32. pip install fairscale
  33. 参考:https://github.com/opendatalab/MinerU/issues/411
  34. 6.在部分较新的设备如H100上,使用CUDA加速OCR时解析出的文字乱码。
  35. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  36. cuda11对新显卡的兼容性不好,需要升级paddle使用的cuda版本
  37. .. code:: bash
  38. pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu123/
  39. 参考:https://github.com/opendatalab/MinerU/issues/558
  40. 7.在部分Linux服务器上,程序一运行就报错 ``非法指令 (核心已转储)`` 或 ``Illegal instruction (core dumped)``
  41. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42. 可能是因为服务器CPU不支持AVX/AVX2指令集,或cpu本身支持但被运维禁用了,可以尝试联系运维解除限制或更换服务器。
  43. 参考:https://github.com/opendatalab/MinerU/issues/591 ,https://github.com/opendatalab/MinerU/issues/736