[MacPorts] #72013: ocrmypdf used python313 variant of img2pdf, but python312 is installed
MacPorts
noreply at macports.org
Fri Feb 7 04:23:43 UTC 2025
#72013: ocrmypdf used python313 variant of img2pdf, but python312 is installed
-------------------------------+----------------------
Reporter: wsshin | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Keywords: ocrmypdf, img2pdf | Port: ocrmypdf
-------------------------------+----------------------
Once ocrmypdf installed, it generates the following error messages upon
running:
{{{
$ ocrmypdf
Traceback (most recent call last):
File "/opt/local/bin/ocrmypdf", line 5, in <module>
from ocrmypdf.__main__ import run
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13
/site-packages/ocrmypdf/__init__.py", line 10, in <module>
from ocrmypdf import helpers, hocrtransform, pdfa, pdfinfo
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13
/site-packages/ocrmypdf/helpers.py", line 26, in <module>
import img2pdf
ModuleNotFoundError: No module named 'img2pdf'
}}}
The error message indicates that it cannot find img2pdf for Python 3.13,
but the installation messages for ocrmypdf indicates that img2pdf for
Python 3.12 was installed:
{{{
---> Fetching archive for img2pdf
---> Attempting to fetch img2pdf-0.5.1_0+python312.darwin_any.noarch.tbz2
from https://packages.macports.org/img2pdf
---> Attempting to fetch
img2pdf-0.5.1_0+python312.darwin_any.noarch.tbz2.rmd160 from
https://packages.macports.org/img2pdf
---> Installing img2pdf @0.5.1_0+python312
---> Activating img2pdf @0.5.1_0+python312
---> Cleaning img2pdf
}}}
Installing the python313 variant resolved the issue:
{{{
$ sudo port install img2pdf +python313
[installation messages]
$ ocrmypdf # runs fine
}}}
I am new to MacPorts, so I am not sure why this version compatibility
issue occurred. Please advise how to proceed. to fix the issue.
--
Ticket URL: <https://trac.macports.org/ticket/72013>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list