Hello Sean, On 12/01/2019 17:28, Sean Whitton wrote: > I think that you need to patch the pdfminer code, then, because it looks > like it is trying to load pycryptodome, rather than pycrypto. > > OCRmyPDF is currently patched not to use pdfminer at all, but before > that, I was seeing this: > > spwhitton@develacc:~>ocrmypdf --version > Traceback (most recent call last): > File "/usr/bin/ocrmypdf", line 6, in <module> > from pkg_resources import load_entry_point > File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line > 3126, in <module> > @_call_aside > File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line > 3110, in _call_aside > f(*args, **kwargs) > File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line > 3139, in _initialize_master_working_set > working_set = WorkingSet._build_master() > File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line > 581, in _build_master > ws.require(__requires__) > File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line > 898, in require > needed = self.resolve(parse_requirements(requirements)) > File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line > 784, in resolve > raise DistributionNotFound(req, requirers) > pkg_resources.DistributionNotFound: The 'pycryptodome' distribution was > not found and is required by pdfminer.six > > i.e. when OCRmyPDF tries to load pdfminer.six, pdfminer.six tries to > load pycryptodome. > > Let me know what you decide to do, as it might be possible to reenable > pdfminer.six in OCRmyPDF.
Thanks for spotting this, I patched pdfminer and removed pycryptodome from install_require, since it's not used, and it's not really required. Just uploaded the new revision, now pgk_resource seems is fine: >>> import pkg_resources >>> pkg_resources.require(['pdfminer.six']) [pdfminer.six 20181108 (/usr/lib/python3/dist-packages)] Kind regards, -- Daniele Tricoli 'eriol' https://mornie.org
signature.asc
Description: OpenPGP digital signature