aboSamoor / polyglot

Multilingual text (NLP) processing toolkit
http://polyglot-nlp.com
Other
2.31k stars 337 forks source link

ImportError: libicule.so.57: cannot open shared object file: No such file or directory #153

Open guigarfr opened 6 years ago

guigarfr commented 6 years ago

I got this error after upgrading to ubuntu 18.04 when trying to execute from polyglot.detect import Detector

Error
Traceback (most recent call last):
  File "/home/---/.virtualenvs/mltools/lib/python3.6/site-packages/rpscience/tokenizer/listing_titles.py", line 13, in <module>
    from polyglot.detect import Detector
  File "/home/---/.virtualenvs/mltools/lib/python3.6/site-packages/polyglot/detect/__init__.py", line 1, in <module>
    from .base import Detector, Language
  File "/home/---/.virtualenvs/mltools/lib/python3.6/site-packages/polyglot/detect/base.py", line 11, in <module>
    from icu import Locale
  File "/home/---/.virtualenvs/mltools/lib/python3.6/site-packages/icu/__init__.py", line 37, in <module>
    from _icu import *
ImportError: libicule.so.57: cannot open shared object file: No such file or directory

If i query apt...

apt-cache policy libicu-dev
libicu-dev:
  Instalados: 60.2-3ubuntu3
  Candidato:  60.2-3ubuntu3
  Tabla de versión:
 *** 60.2-3ubuntu3 500
        500 http://es.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
fnielsen commented 5 years ago

I get this error too. In my Ubuntu 18.04 I have a libicule.so.55.1 in a "snap" directory.

fnielsen commented 5 years ago

The following help for Python2 and Python3:

sudo pip2 install --upgrade  PyICU

sudo pip3 install --upgrade  PyICU