Can't seem to import data for nominatim. Getting 'ModuleNotFoundError: No module named 'tkinter''

I’m trying to set up a server and database for nominatim. I’m having trouble importing data from an osm.pbf file. I’m getting an error with a module, tkinter, not being found. I installed tkinter with ‘sudo dnf install python3-tkinter,’ but I’m still getting an import module error when I try to run the import. Any solutions? Thanks!

…2024-04-28 02:44:18: Setting up tokenizer
Traceback (most recent call last):
File “/usr/local/bin/nominatim”, line 14, in
File “/usr/local/lib64/nominatim/lib-python/nominatim/”, line 264, in nominatim
File “/usr/local/lib64/nominatim/lib-python/nominatim/”, line 126, in run
File “/usr/local/lib64/nominatim/lib-python/nominatim/clicmd/”, line 124, in run
tokenizer = self._get_tokenizer(args.continue_at, args.config)
File “/usr/local/lib64/nominatim/lib-python/nominatim/clicmd/”, line 190, in _get_tokenizer
return tokenizer_factory.create_tokenizer(config)
File “/usr/local/lib64/nominatim/lib-python/nominatim/tokenizer/”, line 66, in create_tokenizer
tokenizer_module = _import_tokenizer(module_name)
File “/usr/local/lib64/nominatim/lib-python/nominatim/tokenizer/”, line 44, in _import_tokenizer
return importlib.import_module(‘nominatim.tokenizer.’ + name + ‘_tokenizer’)
File “/usr/lib64/python3.11/importlib/”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1204, in _gcd_import
File “”, line 1176, in _find_and_load
File “”, line 1147, in _find_and_load_unlocked
File “”, line 690, in _load_unlocked
File “”, line 940, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/usr/local/lib64/nominatim/lib-python/nominatim/tokenizer/”, line 24, in
from nominatim.tokenizer.icu_rule_loader import ICURuleLoader
File “/usr/local/lib64/nominatim/lib-python/nominatim/tokenizer/”, line 15, in
from icu import Transliterator
File “/usr/local/lib/python3.11/site-packages/icu/”, line 3, in
import tkinter as tk
ModuleNotFoundError: No module named ‘tkinter’

There is a problem with your installation of PyICU. You haven’t provided us with much information about your installation. But if I have to guess: you probably have installed the Python package icu instead of libICU.