xxyzz / WordDumb

A calibre plugin that generates Kindle Word Wise and X-Ray files for KFX, AZW3, MOBI and EPUB eBook.
https://xxyzz.github.io/WordDumb/
GNU General Public License v3.0
386 stars 19 forks source link

Cannot run WordDumb (Flatpak install) #29

Closed krillin666 closed 1 year ago

krillin666 commented 2 years ago

Describe the bug

I cannot use WordDumb, is it because my installation is from flatpak ? Any way to fix this ? This plugin looks really cool, congrats !

System Information

OS: Fedora 35

Error message

calibre, version 5.40.0 (linux, embedded-python: True)
Hello, my name is Philip, but everyone calls me Pip, because they hate me.: Run the command "sudo apt install python3-pip" to install pip module if you are using Debian based distro. 

If you still have this error, make sure you installed calibre with the binary install command but not from Flathub or Snap Store. 

Starting job: Generating X-Ray for Alice's Adventures in Wonderland 
Job: "Generating X-Ray for Alice's Adventures in Wonderland" failed with error: 
Traceback (most recent call last):
  File "calibre/gui2/threaded_jobs.py", line 82, in start_work
  File "calibre_plugins.worddumb.parse_job", line 63, in do_job
    install_deps = InstallDeps(model, plugin_path, book_fmt, notifications)
  File "calibre_plugins.worddumb.deps", line 23, in __init__
    self.install_x_ray_deps()
  File "calibre_plugins.worddumb.deps", line 59, in install_x_ray_deps
    self.pip_install(
  File "calibre_plugins.worddumb.deps", line 83, in pip_install
    subprocess.run(args, check=True, capture_output=True, text=True)
  File "subprocess.py", line 512, in run
subprocess.CalledProcessError: Command '['python3', '-m', 'pip', 'install', '-U', '-t', PosixPath('/home/hidden/.var/app/com.calibre_ebook.calibre/config/calibre/plugins/worddumb-libs-py3.8'), '--no-deps', 'Jinja2==3.1.1']' returned non-zero exit status 1.

Called with args: ((2, 'EPUB', "/home/hidden/Calibre Library/Lewis Carroll/Alice's Adventures in Wonderland (2)/Alice's Adventures in Wonderland - Lewis Carroll.epub", <calibre.ebooks.metadata.book.base.Metadata object at 0x7f2244c58400>, {'spacy': 'en_core_web_', 'wiki': 'en'}), False, True) {'notifications': <queue.Queue object at 0x7f2244c582e0>, 'abort': <threading.Event object at 0x7f2244c58fa0>, 'log': <calibre.utils.logging.GUILog object at 0x7f2244cba850>} 
/usr/bin/python3: No module named pip

Reproduce steps

  1. Open Calibre
  2. Run WordDumb
  3. Get error

Screenshots or videos

No response

xxyzz commented 2 years ago

Flatpak apps are sandboxed, so they can't find pip even if you installed pip. All Linux users except Arch Linux users should run the binary install command(https://calibre-ebook.com/download_linux) to install calibre. Then install pip. For Fedora, you could run this command: sudo dnf install python3-pip