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

ERROR: Can not combine '--user' and '--target' #40

Closed Tailslide closed 2 years ago

Tailslide commented 2 years ago

Describe the bug

Maybe related to this: https://stackoverflow.com/questions/63783587/pip-install-cannot-combine-user-and-target

System Information

Windows 10 Calibre 6.0.0 x64 Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32

Error message

calibre, version 6.0.0 (win32, embedded-python: True)
Tonnerre de Brest!: An error occurred, please copy error message then report bug at GitHub.

Starting job: Generating Word Wise and X-Ray for bookname
Job: "Generating Word Wise and X-Ray for bookname" 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 105, in do_job
  File "calibre_plugins.worddumb.deps", line 33, in install_deps
  File "calibre_plugins.worddumb.deps", line 67, in install_x_ray_deps
  File "calibre_plugins.worddumb.deps", line 106, in pip_install_pkgs
  File "calibre_plugins.worddumb.deps", line 101, in pip_install
  File "calibre_plugins.worddumb.utils", line 39, in run_subprocess
  File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['python', '-m', 'pip', 'install', '-U', '-t', WindowsPath('C:/Users/gregp/AppData/Roaming/calibre/plugins/worddumb-libs-py3.10'), '--no-deps', '--no-cache-dir', '--disable-pip-version-check', 'Jinja2==3.1.2']' returned non-zero exit status 1.

Called with args: ((8253, 'KFX', '\\\\nas5\\GregsDocs\\Calibre Library\\Author Name\\bookname (12345)\\bookname.kfx', <calibre.ebooks.metadata.book.base.Metadata object at 0x000001D691175E10>, {'spacy': 'en_core_web_', 'wiki': 'en', 'kaikki': 'English'}), True, True) {'notifications': <queue.Queue object at 0x000001D6911740D0>, 'abort': <threading.Event object at 0x000001D691174F40>, 'log': <calibre.utils.logging.GUILog object at 0x000001D691174160>} 
ERROR: Can not combine '--user' and '--target'

Reproduce steps

Click the WordDumb plugin button. Error.

Screenshots or videos

No response

xxyzz commented 2 years ago

The link you provided said the error is caused by the Microsoft store Python. Have you tried uninstalling it then installing Python from the python.org installer or Chocolatey?

Tailslide commented 2 years ago

It's my development PC.

I'll likely just give up on using the plugin rather than mess with uninstalling and reinstalling python.. thought you might want to know about the error.

The reason I'm setting it up on windows is I'm having trouble using plugins on my docker container I run calibre in. Setting up yet another virtual environment to run a third copy of calibre is just too many levels of inception for me so I'm admitting defeat :)

xxyzz commented 2 years ago

Thanks for your report! The above commit should fix the error.

Tailslide commented 2 years ago

Thanks! That seemed to fix it. I'm getting an unrelated error but I'll open a new issue for that one.