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 install en-core-web-trf because these package versions have conflicting dependencies. #89

Closed ralph5150 closed 1 year ago

ralph5150 commented 1 year ago

Checkboxes

Describe the bug

Job crashes instantly with cuda disabled, error below is with cuda enabled. All issues resolved by installing older python release, in my case 3.10.5.

System Information

OS: Windows 11, 64bit Calibre version: 6.9.0, 64bit Python version: 3.11.0, 64bit Plugin Version: 3.27.1

Error message

calibre, version 6.9.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 The Fall 
Job: "Generating Word Wise and X-Ray for The Fall" 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 111, in do_job
  File "calibre_plugins.worddumb.deps", line 51, in install_deps
  File "calibre_plugins.worddumb.deps", line 134, in pip_install
  File "calibre_plugins.worddumb.utils", line 47, in run_subprocess
  File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['py', '-m', 'pip', '--disable-pip-version-check', 'install', '-U', '-t', WindowsPath('C:/Users/ralph/AppData/Roaming/calibre/plugins/worddumb-libs-py3.11'), '--no-user', 'https://github.com/explosion/spacy-models/releases/download/en_core_web_trf-3.4.1/en_core_web_trf-3.4.1-py3-none-any.whl']' returned non-zero exit status 1.

Called with args: ((691, 'KFX', 'E:\\My Documents\\Calibre Library\\Albert Camus\\The Fall (691)\\The Fall - Albert Camus.kfx', <calibre.ebooks.metadata.book.base.Metadata object at 0x00000126A7E8A170>, {'spacy': 'en_core_web_', 'wiki': 'en', 'kaikki': 'English', 'gloss': True, 'has_trf': True}), True, True) {'notifications': <queue.Queue object at 0x00000126A7E8A7A0>, 'abort': <threading.Event object at 0x00000126A7E898D0>, 'log': <calibre.utils.logging.GUILog object at 0x00000126A7E882E0>} 
ERROR: Cannot install en-core-web-trf because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Reproduce steps

Run WordDumb with CUDA..

Screenshots or videos

No response

xxyzz commented 1 year ago

Could you run that "py -m pip ..." command manually and post the output?

xxyzz commented 1 year ago

I can reproduce the error but I not sure whether the error was caused by pip or spaCy. This dependency error seems only occur on Windows with Python 3.11. I'd suggest you to uninstall Python 3.11 and install Python 3.10.

PyTorch current only has Python 3.11 wheel file for Linux, you will have to use Python 3.10 until they release the 3.11 version for Windows. But you can still use Python 3.11 for non-transformer models.