View Single Post
Old 07-21-2023, 09:39 PM   #570
arooni
Addict
arooni began at the beginning.
 
Posts: 315
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
Can't seem to make this work despite installing python via homebrew and manually specifying the path variable


Despite this being in [~/Library/Preferences/calibre/macos-env.txt:

```
PATH=/opt/homebrew/opt/python@3.11/libexec/bin:$PATH

```
```
[I] /   master  which python
/usr/local/opt/python@3.11/libexec/bin/python
```


I get this error message:

calibre, version 6.23.0 (darwin, embedded-python: True)
We want... a shrubbery!: Can't find Python. Please read the document of how to install Python.

Starting job: Generating Word Wise and X-Ray for Meditations
Job: "Generating Word Wise and X-Ray for Meditations" 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 154, in do_job
install_deps("lxml", notifications)
File "calibre_plugins.worddumb.deps", line 36, in install_deps
PY_PATH, py_version = which_python()
File "calibre_plugins.worddumb.deps", line 84, in which_python
raise Exception("PythonNotFound")
Exception: PythonNotFound

Called with args: ((411, 'EPUB', '/Users/david/syncthing/ebooks/calibre library/Marcus Aurelius (Emperor of Rome)/Meditations (411)/Meditations - Marcus Aurelius (Emperor of Rome).epub', <calibre.ebooks.metadata.book.base.Metadata object at 0x130f2f610>, 'en'), True, True) {'notifications': <queue.Queue object at 0x130f2f4f0>, 'abort': <threading.Event object at 0x130f2f6d0>, 'log': <calibre.utils.logging.GUILog object at 0x134503c70>}


A little frustrating

Running on my m1 max laptop.

[I] /   master  brew info python
==> python@3.11: stable 3.11.4 (bottled)
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python@3.11/3.11.4_1 (3,286 files, 62MB) *
Poured from bottle using the formulae.brew.sh API on 2023-07-21 at 19:44:38
From: https://github.com/Homebrew/homebrew...python@3.11.rb
License: Python-2.0
==> Dependencies
Build: pkg-config ✔
Required: mpdecimal ✔, openssl@3 ✔, sqlite ✔, xz ✔
==> Caveats
Python has been installed as
/usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/usr/local/opt/python@3.11/libexec/bin

You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.11/site-packages

tkinter is no longer included with this formula, but it is available separately:
brew install python-tk@3.11

gdbm (`dbm.gnu`) is no longer included in this formula, but it is available separately:
brew install python-gdbm@3.11
`dbm.ndbm` changed database backends in Homebrew Python 3.11.
If you need to read a database from a previous Homebrew Python created via `dbm.ndbm`,
you'll need to read your database using the older version of Homebrew Python and convert to another format.
`dbm` still defaults to `dbm.gnu` when it is installed.

For more information about Homebrew and Python, see: https://docs.brew.sh/Homebrew-and-Python
==> Analytics
install: 229,427 (30 days), 731,263 (90 days), 982,938 (365 days)
install-on-request: 111,493 (30 days), 347,518 (90 days), 456,041 (365 days)
build-error: 271 (30 days)
[I] /   master 
arooni is offline   Reply With Quote