could not find libicui18n.so.58 in ubuntu 16.04

4.8k Views Asked by At

I am trying to install pyicu in virtualenv

 pip install PyICU

it installed but while trying to use its method, it through below error

from icu import *


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/harish/anaconda3/envs/newcondaenv/lib/python3.5/site-packages/icu/__init__.py", line 37, in <module>
    from _icu import *
ImportError: libicui18n.so.58: cannot open shared object file: No such file or directory

then tried installing icu binaries with below command

sudo apt-get install libicu-dev

still same issue persist

My system details

  1. os details:Ubuntu 16.04
  2. python version : 3.5
  3. installing inside virtualenv using pip
1

There are 1 best solutions below

1
On

Installing pyicu from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge

Once the conda-forge channel has been enabled, pyicu can be installed with:

conda install pyicu

this solves the problem and it will install pyicu with dependencies