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

WordDumb 3.29.0 cannot find python. #113

Closed shenghxie closed 1 year ago

shenghxie commented 1 year ago

Installed python using homebrew and is installed under

Python has been installed as /usr/local/bin/python3

But WordDumb is having trouble finding python.

calibre, version 6.14.1 (darwin, embedded-python: True)
We want... a shrubbery!: Please read the friendly manual of how to install Python.

Starting job: Generating Word Wise and X-Ray for xxx
Job: "Generating Word Wise and X-Ray for xxx" 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 150, in do_job
    install_deps("lxml", notifications)
  File "calibre_plugins.worddumb.deps", line 35, in install_deps
    PY_PATH, py_version = which_python()
  File "calibre_plugins.worddumb.deps", line 80, in which_python
    r = run_subprocess(
  File "calibre_plugins.worddumb.utils", line 51, in run_subprocess
    return subprocess.run(
  File "subprocess.py", line 501, in run
  File "subprocess.py", line 966, in __init__
  File "subprocess.py", line 1842, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: '/opt/homebrew/bin/python3'

Called with args: ((30, 'EPUB', '/Users/xxx/Library/Mobile Documents/com~apple~CloudDocs/calibre-lib/xxx.epub', <calibre.ebooks.metadata.book.base.Metadata object at 0x120edd780>, 'en'), True, True) {'notifications': <queue.Queue object at 0x120edd810>, 'abort': <threading.Event object at 0x120edd9f0>, 'log': <calibre.utils.logging.GUILog object at 0x120edd8d0>} 

Is there a way to configure the python directory for WordDumb?

No issues with 3.27.1.

xxyzz commented 1 year ago

Homebrew should install python at /opt/homebrew/bin/python3 for arm mac, unless you're using rosetta.