polyglot icon indicating copy to clipboard operation
polyglot copied to clipboard

Ubuntu installation problem

Open DuyguA opened this issue 4 years ago • 2 comments

I installed pyicu via pip , but I still have the following problem:

from icu import Locale
ImportError: cannot import name 'Locale' from 'icu' (/usr/local/lib/python3.8/dist-packages/icu/__init__.py)

icu looks installed correctly, but there's no Locale:

>>> import icu
>>> dir(icu)
['ExternalEventSink', 'ExternalEventSource', 'NAME', 'Pipe', 'SimpleNamespace', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'atexit', 'component', 'config', 'configuration', 'constants', 'copy', 'cycle', 'event', 'eyetracking', 'fuel_monitor', 'generator', 'get_event_sinks', 'get_event_sources', 'get_external_event_sinks', 'get_external_event_sources', 'highlight', 'keyhandler', 'log', 'main_panel', 'os', 'overlay', 'panel', 'pprint', 'process', 'random', 'run', 'start', 'system_monitor', 'task_fuel_monitor', 'task_system_monitor', 'task_tracking', 'tk', 'traceback', 'tracking']

Any help is appreciated, thanks in advance!

DuyguA avatar May 04 '21 19:05 DuyguA

Up. I am having the same installation issue on Ubuntu 20.04.

Edit: I solved the issue by manually updating pyicu, pycld2, and morfessor to the latest versions. I think that the package does not install all the dependencies correctly (I can't see anything relevant in the setup.py)

g8a9 avatar May 24 '21 08:05 g8a9

@g8a9 many thanks for the tip! I installed via pip, I don't know if they're the latest versions. Would you mind telling the version numbers of pyicu , pycld2 and morfessor ?

DuyguA avatar May 25 '21 22:05 DuyguA