elexis-eu / lexonomy

A cloud-based, open-source system for writing and publishing dictionaries.
http://www.lexonomy.eu/
MIT License
86 stars 29 forks source link

Trouble running backend without GUI/Tkinter #314

Closed MemduhG closed 11 months ago

MemduhG commented 11 months ago

Describe the bug Tkinter seems to be needed to run this, even when it's just the backend. Perhaps I am making a mistake. Here is the command I ran and the output it gave me:

$ python lexonomy.py
Traceback (most recent call last):
  File "/root/lex/lexonomy/website/lexonomy.py", line 9, in <module>
    import ops
  File "/root/lex/lexonomy/website/ops.py", line 25, in <module>
    from icu import Locale, Collator
  File "/root/lex/venv/lib/python3.11/site-packages/icu/__init__.py", line 3, in <module>
    import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'

To Reproduce Steps to reproduce the behavior:

  1. SSH to a server with no visual output
  2. Clone the repo
  3. Install the python dependencies with pip
  4. Run with python3 lexonomy.py

Expected behavior I would have expected the backend to start up so I could access it from another machine.

Environment

MemduhG commented 11 months ago

Had the wrong package name for ICU, they explain things on their git website here: https://gitlab.pyicu.org/main/pyicu

What worked for me was:

apt-get install pkg-config libicu-dev
pip install --no-binary=:pyicu: pyicu