#PIP install PyMuPDF error

1 messages · Page 1 of 1 (latest)

leaden turretBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

gaunt jettyBOT
#

I tried to find some solution to fix the error, like with , but I can't get anything.

I will send the error in some seconds

Jump

[Go to message!](#github message)

Since version 1.18.0, mupdf no longer provides libmupdf-third.so. PyMuPDF seems to work fine without it. To get PyMuPDF installed successfully, just create a symlink:

cd $PREFIX/lib/
ln -s libmupdf.so libmupdf-third.so 
worthy finch
#

All the logs are here:
https://pastebin.com/pCba93aS

PyMuPDF:
Home page URL
https://pymupdf.readthedocs.io/en/latest/

Source code URL
https://pymupdf.io/

worthy finch
#

I could download the package with it:

pkg ins glibc-repo
pkg ins python-pip-glibc glibc-runner
grun -s
pip install pymupdf

With pip list I can verify it's really here, but in this case the package is like separated from the others python package, so when I run a python script like normal it says unknown package

worthy finch
#

With CP I copy the package to the default package folder, but know I get this error

#
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/discord/app_commands/commands.py", line 857, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/storage/emulated/0/Documents/Pydroid3/DiscordBot/Python-Discord-Bot-Template-main2/cogs/infos.py", line 52, in pdf_to_image
    import pymupdf
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pymupdf/__init__.py", line 30, in <module>
    from . import extra
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pymupdf/extra.py", line 10, in <module>
    from . import _extra
ImportError: cannot import name '_extra' from partially initialized module 'pymupdf' (most likely due to a circular import) (/data/data/com.termux/files/usr/lib/python3.11/site-packages/pymupdf/__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/discord/ext/commands/hybrid.py", line 444, in _invoke_with_namespace
    value = await self._do_call(ctx, ctx.kwargs)  # type: ignore
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/discord/app_commands/commands.py", line 876, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'pdf_to_image' raised an exception: ImportError: cannot import name '_extra' from partially initialized module 'pymupdf' (most likely due to a circular import) ```
#
(/data/data/com.termux/files/usr/lib/python3.11/site-packages/pymupdf/__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/storage/emulated/0/Documents/Pydroid3/DiscordBot/Python-Discord-Bot-Template-main2/bot.py", line 740, in on_command_error
    raise error
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/discord/ext/commands/hybrid.py", line 444, in _invoke_with_namespace
    value = await self._do_call(ctx, ctx.kwargs)  # type: ignore
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/discord/app_commands/commands.py", line 876, in _do_call
    raise CommandInvokeError(self, e) from e
discord.ext.commands.errors.HybridCommandError: Hybrid command raised an error: Command 'pdf_to_image' raised an exception: ImportError: cannot import name '_extra' from partially initialized module 'pymupdf' (most likely due to a circular import) (/data/data/com.termux/files/usr/lib/python3.11/site-packages/pymupdf/__init__.py)
worthy finch
#

I'm guessing nobody can do anything, it's more python issue than termux now blobhyperthink